2

I'm trying to connect to bitbucket.org via the command line without a request for a password. I know there have been plenty of posts about this but my question is I think a bit more basic.

I'm running git version 2.7.4 on Ubuntu linux in case that matters.

I've added a public key seemingly correctly, and all my permissions on .ssh are 700. I suspect the problem is that in .git/config, I had

[remote "kss1"]
    url = https://bitbucket.org/<myName>/kss1

which several posts have identified as a problem. Based on this post I've modified the url line to

[remote "kss1"]
url = [email protected]:<myName>/kss1

And the response is now

repository access denied.
fatal: Could not read from remote repository

.Googling this error didn't yield anything terribly helpful.

Could anybody advise please?

1 Answer 1

2

Check what key exactly is used with:

GIT_SSH_COMMAND='ssh -v' git push

From there, make sure your public key (used by ssh in the previous command) has been copied to your profile (SSH settings) as one line.

Make sure you don't have multiple remotes (type git remote -v) and that you are indeed using git push kss1 (by default, git push pushes to origin)


Regarding the public key copy issue, the OP Leo Simon confirms in the comments:

I guess there was a space somehow in the copy of the public key.
I remade the public key and now it's working.
No more password prompts!

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks very much, I guess there was a space somehow in the copy of the public key. I remade the public key and now it's working. No more password prompts!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.