Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot clone github repo without being logged in as root, regardless of sudo

Tags:

git

unix

macos

Running on OSX ->

git clone https://github.com/.../project.git
Cloning into 'project'...
remote: Repository not found.
fatal: repository 'https://github.com/.../project.git/' not found

...:repos ...$ sudo git clone https://github.com/.../project.git
Cloning into 'project'...
remote: Repository not found.
fatal: repository 'https://github.com/.../project.git/' not found


...:repos ...$ sudo su


sh-3.2# git clone https://github.com/.../project.git
Cloning into 'project'...
remote: Counting objects: 122, done.
remote: Compressing objects: 100% (93/93), done.
remote: Total 122 (delta 28), reused 114 (delta 20), pack-reused 0
Receiving objects: 100% (122/122), 364.08 KiB | 0 bytes/s, done.
Resolving deltas: 100% (28/28), done.

Another weird thing about this is that this is a private repo and it does not ask for my password when I'm root. I assume it is stored somewhere.

EDIT : the solution is to delete the existing keychain element in the osx keychain

like image 599
Code Wiget Avatar asked Aug 16 '17 14:08

Code Wiget


1 Answers

You have to delete your github credentials in osxkeychain, and then you can recreate them.

like image 169
Scott Newson Avatar answered Oct 03 '22 16:10

Scott Newson