Search code examples
gitrhomobile

Can't clone RhoHub repository - access denied


I've added my ssh key to RhoHub, but I'm still getting an access denied error. Any thoughts?

$ git clone [email protected]:remcat/First App.git
Initialized empty Git repository in /home/Ramy/App.git/.git/
Access denied...
fatal: The remote end hung up unexpectedly

$ git clone '[email protected]:remcat/First App.git'
Initialized empty Git repository in /home/Ramy/First App/.git/
usage: git upload-pack [--strict] [--timeout=nn] <dir>
Error executing 'git-upload-pack'...
fatal: The remote end hung up unexpectedly

Solution

  • If your remote repo url contains space, you might want to add quotes around it:

    git clone "[email protected]:remcat/First App.git"
    

    Otherwise, it will look for a repo named 'App', to be cloned in the local directory "App.git", which I suspect isn't what you want.

    If the error persists, then you need to check for ssh issue, as described in "Heroku push master ssh problem", for instance.

    Start then at least with a ssh -vvvT [email protected].

    But, first, make sure the space in your url isn't the actual problem here.