I cannot clone git repository to my local drive using sourcetree. I have been added to my company git account, and have the same developer rights as other engineers.
I can view the files in the repository, but when I go to clone I get the following error;
When I click details I get the following output;
Command: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote email@example.com:fraserantistaticbristol/lcdc-proteus.git
Error: fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
If I copy the command and paste it in a terminal window I get the following output;
$ git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote firstname.lastname@example.org:fraserantistaticbristol/lcdc-proteus.git
So I seem to have access.
Please help. :(
Update: I can clone the repo using the built in terminal in sourcetree. by running
git clone email@example.com:fraserantistaticbristol/lcdc-proteus.git
But obviously I need this working in the GUI.
Update: I have found the answer. I had too many private keys open in pagent. We have lots of test machines in the company that I am able to ssh into. So I wrote a quick batch script to load all the private keys in pagent on system startup. This apparently breaks sourcetree for some reason. I have updated the script to only open the two most regularly used. This has solved my problem.
The most common issue customers are experiencing related to authentication in SourceTree is due to the deprecation of GIT username/password over HTTPS in favour of App Passwords:
We have a blog post however which explains the steps to troubleshoot this issue, please follow all of these accordingly and this should resolve the issue:
- Ben (Bitbucket Cloud Support)