On bazaar and keys

Mauricio Tavares raubvogel at gmail.com
Tue Dec 3 04:56:01 UTC 2013


On Sun, Dec 1, 2013 at 10:49 AM, Stephen M. Webb
<stephen.webb at canonical.com> wrote:
> On 12/01/2013 09:25 AM, Mauricio Tavares wrote:
>> How do you specify which private key you want to use when accessing the launchpad (and docs) using bazaar?
>
> Bazaar has a plugin called 'launchpad' (which is probably already installed on your system) that will use the SSH
> protocol for authentication.  You can get help on using that plugin from the command line with the command 'bzr help
> launchpad'.
>
> The first time you want to check out or commit a Launchpad branch, you will want to use the command 'bzr
> launchpad-login' to tell Bazaar which Launchpad account to use for authentication.  What this does under the hood is
> store your username in ~/.bazaar/authentication.conf.  When you go to push changes up to the Launchpad server, SSH
> will automatically negotiate authentication using the SSH keys you registered on Launchpad under that username and the
> private keys available on your local machine until it finds a match.  It doesn't really matter which ones, as long as
> you can prove you hold the private key matching one of the public keys on Laucnhpad.
>
> So, in short, you need to upload a public key to Launchpad (through your user page) and configure Bazaar to use your
> Launchpad username (through 'bzr launchpad-login').
>
> The rest is magic.
>
      Ok, I create ~/.ssh/ubuntu_rsa{,.pub} and uploaded
ubuntu_rsa.pub to my launchpad account. I can do the login part of the
show,

raub at desktop:~/docs/Projects/Ubuntu$ bzr whoami "Mauricio Tavares
<raubvogel at gmail.com>"
raub at desktop:~/docs/Projects/Ubuntu$ bzr launchpad-login raubvogel
raub at desktop:~/docs/Projects/Ubuntu$

but the branching part does not seem to work so well:

raub at desktop:~/docs/Projects/Ubuntu$ bzr branch lp:ubuntu-docs
Permission denied (publickey).
ConnectionReset reading response for 'BzrDir.open_2.1', retrying
Permission denied (publickey).
bzr: ERROR: Connection closed: Unexpected end of message. Please check
connectivity and permissions, and report a bug if problems persist.
raub at desktop:~/docs/Projects/Ubuntu$

Since it is barking about a public key, I have to assume it is trying
to use the default one (id_rsa{,.pub}). According to 'bzr help
launchpad', it is using bzr+ssh://, so it would make sense that I can
specify the keys. Maybe it uses ~/.ssh/config?


>
> --
> Stephen M. Webb  <stephen at ubuntu.com>
> https://launchpad.net/~bregma



More information about the ubuntu-doc mailing list