Missed Team ’24? Catch up on announcements here.

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

Permission Denied (publickey) on macOS Sierra with gitlab

Taylor Matte
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 27, 2017

My command-line setup works:

 

ssh -T git@gitlab.com
Welcome to GitLab, Taylor!

But when I try to pull from SourceTree I get this error:

 

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree fetch origin 
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Permission denied (publickey).
fatal: Could not read from remote repository.

Same error when pushing:

 

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags origin refs/heads/master:refs/heads/master 
Pushing to git@gitlab.com:whatever/whatever.git
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Pushing to git@gitlab.com:whatever/whatever.git
Permission denied (publickey).
fatal: Could not read from remote repository.

 I have checked that the ssh-keys are correct in gitlab and that there are no weird permissions in the repo (which is a shared git repo). Any ideas?

1 answer

0 votes
Manju
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 27, 2017

Can you check the agent for loaded keys and see if there is any discrepancy?

This will list all keys. 

ssh-add -l

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events