3

I am getting the below error while cloning? How to fix this?

$ git clone https://github.com/xxx/yyy.git

Cloning into 'yyy'...

remote: Repository not found.

fatal: repository 'https://github.com/xxx/yyy.git/' not found
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Ramya MiiM
  • 245
  • 2
  • 4
  • 11

2 Answers2

4

Either this is the URL of a private repository, and you don't have access.
Or you do have access, but incorrect credentials are stored in a git credential helper.

or you have copied an URL with lowercase/upercase issues (the URL being case sensitive).

Since it is a private GitHub repo, all you need to do is delete your cached credentials: they will be asked again at the next git clone.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • @RamyaMiiM Is it a private repo? – VonC Sep 18 '18 at 04:44
  • Yes its a private repo – Ramya MiiM Sep 18 '18 at 04:45
  • @RamyaMiiM Are you the owner of that private repo, or have you been added as a collaborator (https://help.github.com/articles/inviting-collaborators-to-a-personal-repository/)? – VonC Sep 18 '18 at 04:46
  • No i am not the owner i am a collaborator ... what shall i do now?? – Ramya MiiM Sep 18 '18 at 04:48
  • @RamyaMiiM check your credentials: are you asked to enter your GitHub username/password when cloning? – VonC Sep 18 '18 at 04:49
  • @RamyaMiiM That means those credentials are cached. If you are on Windows, see https://stackoverflow.com/a/38553149/6309 and type `git credential-manager delete https://github.com` or do it with the GUI: https://stackoverflow.com/a/47300337/6309 (here showing bitbucket.org, but in your case, look for github.com) – VonC Sep 18 '18 at 04:53
  • credential.helper=manager user.name=ramya007 user.email=ramya.hello@gmail.com ( Here user.email is not correct) how to fix this????? – Ramya MiiM Sep 18 '18 at 04:58
  • @RamyaMiiM Did you fix the configuration? (user.name and user.email are not important here) – VonC Sep 18 '18 at 04:58
  • @RamyaMiiM See https://stackoverflow.com/a/47300337/6309: delete the github.com entry. Clone again, this time enter your credentials. – VonC Sep 18 '18 at 04:59
  • Thanks a lot :-) now cloning but i have removed credentials instead of "edit" will it make any issue?? – Ramya MiiM Sep 18 '18 at 05:10
  • @RamyaMiiM no: next time you enter your credentials, they will be cached again. – VonC Sep 18 '18 at 05:15
  • Yeah Thank you :-) – Ramya MiiM Sep 18 '18 at 07:08
  • @RamyaMiiM I meant: https://stackoverflow.com/help/accepted-answer (although, as a new user, you might not be able to accept immediately) – VonC Sep 18 '18 at 07:16
  • Removed cached credential from system's config - `git config --system --unset credential.helper` and it worked! – Soothran Mar 08 '21 at 11:01
0

Generate a Token an GitHub. then Clone your repo by using token code ! using follow that steps

01 : Goto your Github ... Settings / Developer settings click personal Access Tokens click on Generate new Token

02 : Marks the admin:org , repo and same required failed .

03 : Must save your Token link .that only showe first time.

04 : clone your repo by using HTTPS link . it work .

05 : if that's not Work. that take a pass add your Token link that is your repo pass

if you can't understand click on img

enter image description here

Boken
  • 4,825
  • 10
  • 32
  • 42