git clone
gives the message fatal: repository \'url\' not found
I tried the options in the link, but it didn\'t work.
In my case. repository is private I can't access it directly. On ly way to use Github Desktop app to fetch this repo.
If you are using two factor authorization (2FA) for your Github account then just use SSH option for cloning your repository:
I'm a devops engineer and this happens with private repositories. Since I manage multiple Github organizations, I have a few different SSH keys. To overcome this ERROR: Repository not found. fatal: Could not read from remote repository.
error, you can use
export GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -o User=git -i ~/.ssh/ssh_key_for_repo"
git clone git@github.com:user/repo.git
For me
git clone https://username@github.com/name/repo.git
worked.
I think this mainly happens because Private repo can't be accessed directly.
As mentioned by others the error may occur if the url is wrong.
However, the error may also occur if the repo is a private repo and you do not have access or wrong credentials.
Instead of
git clone https://github.com/NAME/repo.git
try
git clone https://username:password@github.com/NAME/repo.git
You can also use
git clone https://username@github.com/NAME/repo.git
and git will prompt for the password (thanks to leanne for providing this hint in the comments).
Authentication issue: I use TortoiseGit GUI tool, I need to tell tortoise the username and password so that it can access to work with Git/GitHub/Gitlab code base. To tell it, rt click inside any folder to get TortoiseGit menu. Here TortoseGit > Settings Window > Select Credentials in left nav tree Enter URL:Git url Helper: Select windows if your windows credentials are same as the ones for Git or 'manager' if they are different userName; Git User Name Save this settings ans try again. You will be prompted for password and then it worked.