# Why do I have to unlock my private key to perform a download operation?

I don't understand why I must be identified - anyone can download this branch. I get the same prompt when I upload to launchpad - that makes far more sense to me.

Anyone know why bzr does this?

-

bzr is using a ssh-key that is stored in your keyring, the calling application would actually be ssh-agent. Your keyring has a password set so that nobody else can access that key without the password. For more information on keyrings see: my answer to this post

THe only way that i'm aware of defaulting this behavior is to generate a private/public keypair without a password.

-
But why is bzr using the key in the first place? –  htorque Apr 10 '11 at 13:06
The location service used to resolve the lp: branch names does not distinguish between whether you want to read or write the branch. It will use the SSH transport if you've told it about your Launchpad account so that write access will work if needed. SSH connections require access to your SSH private key in order to authenticate to the server. –  James Henstridge Apr 11 '11 at 7:11
Great insight James. –  lazyPower Apr 11 '11 at 15:16
Another way to look at it is: bzr always prefers to use ssh to download branches from Launchpad, even if the branch is publicly available. (A bit like the way Launchpad always uses SSL even for public bugs.) Using SSH prevents accidental or intentional interference from other things on the network (firewalls etc) and is generally a bit faster once the connection's set up. –  poolie Apr 19 '11 at 23:29
@James @poolie I've made your comments into a "community wiki" answer, thank you for the explanations :) –  8128 Apr 24 '11 at 15:18

The location service used to resolve the lp: branch names does not distinguish between whether you want to read or write the branch. It will use the SSH transport if you've told it about your Launchpad account so that write access will work if needed. SSH connections require access to your SSH private key in order to authenticate to the server.

Another way to look at it is: bzr always prefers to use ssh to download branches from Launchpad, even if the branch is publicly available. (A bit like the way Launchpad always uses SSL even for public bugs.) Using SSH prevents accidental or intentional interference from other things on the network (firewalls etc) and is generally a bit faster once the connection's set up.

-