Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Hello, today I suddenly cannot push/pull my repos with git. very frustrating.

jeff peery September 13, 2018

Hello, Below is the error message returned when pushing/pulling to git. I didn't change anything. Just got in work today and things are totally broken. I am using Mac OSX High Sierra, 10.13.6

""" git@github.com: Permission denied (publickey). Fatal: Could not read from remote repository. """

I tried to delete my account in Sourcetree preferences, and recreate. I double checked my account user name by logging directly into GitHub.com - no problem. I tested Sourcetree on other machines in my office (Windows), they work fine.

I then attempted to downgrade from 2.7.3 to 2.6. this also didn't work.  I see there are numerous threads on your forums regarding this, and this seems to be an ongoing bug. I am totally stuck and cannot proceed with my work.

 

What is the way forward. Thanks in advance!

1 answer

0 votes
Manju
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 13, 2018

Please check if the ssh-agent has your keys loaded. If not, please add them to the agent. 

Run below commands in terminal to do so,

To check if keys are loaded:

ssh-add -l

To add keys to agent:

ssh-add <path_to_key>

more like,

ssh-add ~/.ssh/id_rsa

Key in the passphrase used while generating the ssh key and you should be good to go.

jeff peery September 13, 2018

Hi, thanks for the response!

Is this relevant if I am using HTTPS?

jeff peery September 13, 2018

I pasted below the full error. I hope that is helpful. Still unable to use SourceTree. I'm using the HTTPS mode, not SSH.

 

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree fetch origin 

git@github.com: Permission denied (publickey).

fatal: Could not read from remote repository.

 

Please make sure you have the correct access rights

and the repository exists.

git@github.com: Permission denied (publickey).

fatal: Could not read from remote repository.

 

Please make sure you have the correct access rights

and the repository exists.

git@github.com: Permission denied (publickey).

fatal: Could not read from remote repository.

 

Please make sure you have the correct access rights

and the repository exists.

git@github.com: Permission denied (publickey).

fatal: Could not read from remote repository.

 

Please make sure you have the correct access rights

and the repository exists.

Completed with errors, see above

Manju
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 13, 2018

This definitely isn't an error you should see with https. Can you check the account configuration in Sourcetree and also verify that the remote URL in the repository is indeed https?

jeff peery September 14, 2018

that was it. looks like perhaps when Sourcetree updated it clobbered the URL's for all my repo's. I reset to https now all is well. thanks for the help. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events