Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can't push my first branch, getting hungup on security issue.

P Tocco
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!
August 14, 2018

 I'm not sure how to phrase this into a meaningful question. I started a new job last week, have set up all the credentials that I know of, including bitbucket's 2FA.  I generated a new key pair, added them to my ssh config, and added the public key to my bitbucket keys. No login problems that I know of. (though I do need to change my Atlassian pw but can't find where.)  

In any case when I push my branch with this:

git push -u origin [your Branch name]

I get this:

’git@bitbucket.org: Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

 

Now I did notice that Bitbucket's ssh setup asked me to add 

'UseKeychain yes' to the ssh config file. No problem, but it did not ask me to add a Host statement for bitbucket. Previously, my employer had me add a line for each server I'd be accessing, such as:

Host dev1
IdentityFile ~/.ssh/id_rsa_project1 User jsmith

Currently I already have a github host statement:

 

Host
github.com IdentityFile ~/.ssh/id_rsa_project1

 

So I'm wondering, do I need to add in a line for the Atlassian host??  Especially since I already have a github host listed?  Or something else I'm missing?

 

Thanks!

Peter

 

 

1 answer

1 accepted

0 votes
Answer accepted
P Tocco
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!
August 14, 2018

I solved my problem. I think I may have incorrectly entered my newly created public key into the Bitbucket input box the first time. 

Also, made sure to set origin after new key was added:

git push --set-upstream origin <branch_name>

and checked this:

eval 'ssh-agent'

and used this to authenticate:

ssh -T git@bitbucket.org

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events