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.
Any ideas?
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
Sorry Marcus - that is a typo. I changed the Host names in the comment for privacy reasons (my names are pretty descriptive) and forgot to use the same replaced host name in the git config. So in reality, they do match.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you'd prefer, reply to the private issue with specific details from your config. I still think this is the root cause of the issue. Also, please include the reply from Bitbucket from ssh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This error means that you don't have permission to the repository on Bitbucket. Is this a repository you own? Is it possible you are over your plan limit?
You should log in to Bitbucket and take a look at the repo to ensure you still have access.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There's no indication on BitBucket that anything is wrong.... My plan is "5 Users" and I'm the repo owner... I can view all the code in the repo on BitBucket
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you either report your username and the URL of the repo you are accessing here? Or privately to support.atlassian.com under the Bitbucket project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have created an issue:
I couldn't create it under the BitBucket project - kept being sent round in circles from validating my support entitlement to OnDemand Support. Gave up after a few frustrating attempts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
Check
ssh -Tv git@bitbucket.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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.