I've created a new repo on BitBucket, set up my SSH keys and was successfully pushing/pulling using that key over SSH. Everything worked 100% for three or four days, now suddenly, I get:
conq: repository access denied.
Whenever I try to push/pull/fetch. I've checked my git config file and my .ssh/known_hosts and everything looks exactly correct....... It's been like this for a day or two now.
Thanks for the information in private. It sounds like you may be sending us a different key than you have regsitered. From our SSH Troubleshooting Guide, try the following:
ssh -Tv firstname.lastname@example.org
This will show you which user, if any, is authenticating on Bitbucket. If you get access denied outright, then see which key you are offering Bitbucket. This can also be checked/configured in ~/.ssh/config. You should have a Host entry for Bitbucket. Ensure that the private key being offered there is the matching public key for your user in Bitbucket. Finally, be sure your SSH key is registered on your actual user account and not as a deployment key.
For more troubleshooting, check out that doc.
Running your suggested code, it only tests the login for my other bitbucket repo (which works 100%). Does this suggest there's a problem with my .ssh config:
Host firstHost HostName bitbucket.org IdentityFile ~/.ssh/id_rsa Host secondHost HostName bitbucket.org IdentityFile ~/.ssh/BitBucket
Or is the issue in my git config for the failing repo:
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] url = git@BitBucket:<myusername>/<myreponame>.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master
Does this suggest there's a problem with my .ssh config
Yes, it does.
Look at your Git config, your URL contains Bitbucket, but your ~/.ssh/config file contains named hosts of firstHost and secondHost. Chage the URL in your git config to match your named host to use the correct key. For example:
url = git@secondHost:<username>/<repo_slug>.git
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs