How can you avoid being asked to enter your BitBucket password when you push to BitBucket wiki?

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 [email protected]:UserName/project-name.git, the wiki repository can be accessed at [email protected]: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 [email protected]: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 [email protected]: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.


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/

https://confluence.atlassian.com/bbkb/permission-denied-publickey-302811860.html

Tags:

Git

Ssh

Wiki