I'm not sure if everyone experiences this - when I edit a BitBucket wiki locally (through a git repository) I have to enter my BitBucket password for every pull and push.

Is there any way around this?

I have ssh correctly configured to use a key that is unlocked by gnome-keyring. Pushing to the code repository for my project in BitBucket works fine - I do not need to enter either by BitBucket or ssh key password.

  • I also experience the same issue. The problem is that the wiki repo must be accessed through HTTPS, not SSH, and there seems to be no way to solve this. Bitbucket only provides a URI for wiki access using HTTPS, but they would have to provide another one for SSH in order for key authentication to work with wiki repos. – Genba May 12 '12 at 11:28
  • Anyway, it seems that cloning wiki repos through SSH is indeed possible using Mercurial, but I still haven't found a way to do so using Git bitbucket.org/site/master/issue/2653/… – Genba May 12 '12 at 11:36
  • 1
    Possible duplicate of How do I disable password prompts when doing git push/pull? – Ramhound Aug 20 '16 at 23:25

The problem is that, when you clone the wiki's repository, the clone is done through HTTPS, since the link provided by Bitbucket uses HTTPS to access the repository. What you need is a way to access using SSH as the protocol, instead of HTTPS.

It is actually possible to access the wiki's Git repository through SSH, although Bitbucket does not provide the link to do that.

Thanks to a ticket on Bitbucket's issue tracking system, I found that you can access the wiki repository through SSH by using the same URI of the project's repository, but with /wiki appended.

So, if your project's repository is under git@bitbucket.org:UserName/project-name.git, the wiki repository can be accessed at git@bitbucket.org:UserName/project-name.git/wiki, instead of using the HTTPS URI provided by Bitbucket.

This way, you can clone your wiki by running the command

git clone git@bitbucket.org:UserName/project-name.git/wiki

or, if you have already cloned the wiki repository using HTTPS, you can change the origin remote to use SSH by running the command

git remote set-url origin git@bitbucket.org:UserName/project-name.git/wiki

I have already tried this, and it works perfectly! You will not be prompted for your password anymore, since Git is now using SSH with your SSH key to log into the server.

  • 1
    It's so simple once you hear the solution :p Thanks! – keyser Jul 25 '14 at 18:24
  • I didn't know this before – aladine Oct 13 '15 at 16:49

Choose Username > Manage Account from the menu bar. The system displays the Account settings page. Click SSH keys.: https://bitbucket.org/account/user/YOURNAME/ssh-keys/


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.