git clone - fatal: remote error: access denied or repository not exported

underscore666 picture underscore666 · Apr 23, 2012 · Viewed 43.9k times · Source

When I try to perform the following command, git clone git://github.com/mainDir/dirA, I get the following error:

> git clone git://github.com/mainDir/dirA
Cloning into 'dirA'...
fatal: remote error: access denied or repository not exported: /8/nw/87/1e/aa/2154553/2154553.git

git://github.com/mainDir is a private repository

If I try to use github for the mac... I see the message Cannot find repository.

For sure the problem is in my desktop (client part) because I know how to reproduce the problem:

1) git clone repo on my desktop (it works)
2) rm -rf repo
3) git clone repo and I get the error

How can I fix this problem?

Answer

ngm picture ngm · Apr 24, 2012

Is it actually a private repository? If so, I don't believe that

git clone git://github.com/mainDir/dirA

will work. Try

git clone [email protected]:mainDir/dirA

From github help:

For public repos, the URL can be a read-only URL like git://github.com/user/repo.git or an HTTP read-only URL like http://github.com/user/repo.git. For public repos you own or are a collaborator on, and all private repos, you must use a private ssh url like [email protected]:user/repo.git.