Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
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 Answer 1

up vote 5 down vote accepted

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.

share|improve this answer
    
It's so simple once you hear the solution :p Thanks! –  keyser Jul 25 at 18:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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