Bzr and SSH guide

Asked by Thurston

I am looking at the guide here:
http://bazaar-vcs.org/Bzr_and_SSH

It doesn't mention anything about setting up Bzr with ssh... just setting up ssh by itself. What steps are needed to configure bazaar to work with ssh?

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
David Clymer (vezult) said :
#1

You may need to install python-paramiko which is a python library that bazaar uses to privide ssh/sftp support by default. Alternatively, you should be able to set the appropriate environment variable: BZR_SSH=ssh

http://doc.bazaar-vcs.org/bzr.dev/en/user-reference/bzr_man.html#environment-variables

The guide you reference addressed the situation where you want to use ssh-keys rather than typing in the remote password each time you push or pull from your branch.

Revision history for this message
Thurston (tstone2077) said :
#2

I would like to use SSH keys rather than typing a password each time, so judging by your response, I should use the guide I had referenced. I have read the instructions and generated the keys, but there is nothing specific to bazaar. It is basically a condensed version of something like http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter8.html.

Are there any steps specific to bazaar that I have to do to set this up? Do I have to edit a config file or something like that? or does it automatically know that I want to use pageant and what keys to use? if the latter is the case, then perhaps renaming the page from "Bzr and SSH" to "Setting up SSH Keys" would make the title more accurate. (also, if it is the latter case, then I did something wrong).

Revision history for this message
Martin Pool (mbp) said :
#3

Just to confirm, you are actually on Microsoft Windows? The pages you cite are Windows-specific.

To tell Bazaar to use ssh, you just need to install bzr on both client and server, and give the client an SSH url, e.g.

  bzr push bzr+ssh://server.example.com/bzr/something

Revision history for this message
Vernon Cole (vernondcole) said :
#4

zThe error message is not very self explanatory, and the documentation of the possible values of the environment variable BZR_SSH is not helpful.

You don't really need paramiko and pycrypt, I did a lot of experimenting and tried (this is on Windows XP) "Set BZR_SSH=plink" (since I have PuTTY installed) but found that it will only work if plink.exe is on the search path.

Interestingly enough, when I removed the environment variable, it still worked. You don't need it.

So, the quickest SSH set up (for Windows) seems to be:

1) Install PuTTY [http://www.putty.org]

2) generate SSH keys with puttygen

3) Start Pageant and load your private key

4) push your public key to your bazaar server. -- If you can use PuTTY to connect to a Linux box using SSH you are halfway there. (You must have a login on the server.) Edit the file ~/.ssh/authorized_keys using your favorite Linux text editor and paste in the string from the big box in puttygen. Windows users note that .ssh is a "hidden" folder in your home (default) directory. When you no longer need to type your password to connect using PuTTY, your SSH is set up correctly.

5) make sure plink is on your search path. (the dirty way is to copy plink.exe into C:\WINDOWS)
If you saved a session name while you were in PuTTY, you can test this by something like:
C:> plink savedSessionName ls
and you will see the listing of your Linux home folder on your windows console.

6) bzr pull bzr+ssh://<email address hidden>/path/to/tree

Happy bazaaring.
--
Vernon Cole

Can you help with this problem?

Provide an answer of your own, or ask Thurston for more information if necessary.

To post a message you must log in.