r/o code download with lp: prefix asks for ssh key

Bug #455636 reported by anatoly techtonik
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

bzr causes too much troubles compared to other VCS. For example, I want to checkout code from the project I do not have write access. Launchpad recommend me to use the following command:

> bzr branch lp:yahebwinpy
Connected (version 2.0, client Twisted)
bzr: ERROR: Connection error: Unable to authenticate to SSH host as
  <email address hidden>
supported auth types: ['publickey']

I shouldn't be asked for my publickey for read only access.

affects: launchpad → launchpad-code
Revision history for this message
Aaron Bentley (abentley) wrote :

If you have done "bzr launchpad-login", your access to Launchpad will be via bzr+ssh. If you have not done launchpad-login, your access to Launchpad will be done via http.

bzr+ssh has significant performance advantages over http, so we will use it whenever possible.

Changed in launchpad-code:
status: New → Invalid
Changed in launchpad-code:
status: Invalid → Incomplete
Revision history for this message
anatoly techtonik (techtonik) wrote :

Even though I am a little bit puzzled how encrypted SSH access can produce less overhead than HTTP I won't ask about that, because it doesn't solve my problem.

I still can't see why should it ask for my private key of I am requesting read-only access for the branch I do not have commit privilege anyway. It just wastes my time to regenerate the key I'm lost, upload it, probably wait for it to appear on auth server. Needless to say that bazaar config doesn't contain a word about where do you need to put you private key so that it can find them on windows. That's just wastes time.

Revision history for this message
Tim Penhey (thumper) wrote : Re: [Bug 455636] Re: r/o code download with lp: prefix asks for ssh key

On Wed, 21 Oct 2009 12:54:24 anatoly techtonik wrote:
> Even though I am a little bit puzzled how encrypted SSH access can
> produce less overhead than HTTP I won't ask about that, because it
> doesn't solve my problem.
>
> I still can't see why should it ask for my private key of I am
> requesting read-only access for the branch I do not have commit
> privilege anyway. It just wastes my time to regenerate the key I'm lost,
> upload it, probably wait for it to appear on auth server. Needless to
> say that bazaar config doesn't contain a word about where do you need to
> put you private key so that it can find them on windows. That's just
> wastes time.

What you really want then is a `bzr lp-logout` and there is a bug filed about
that.

By specifying a launchpad identity for bazaar we use the most efficient
transport. bzr+ssh is more efficient for both reading and writing. I think
there is also another bug about not being able to fallback to http if for some
reason bzr+ssh fails.

You only need an ssh key, and we only check against the public portion that
you enter into LP, so once you have added it to your user page, there is no
other waiting.

If you have lost your old one, you should probably remove it if you haven't
already.

Revision history for this message
anatoly techtonik (techtonik) wrote :

Feel free to mark this issue as a duplicate of that bug about not being able to fallback to http.

In the meanwhile can you tell me where should I place my launchpad private key on windows if my .ssh/id_rsa key already contains private key I use for other purposes.

Revision history for this message
Robert Collins (lifeless) wrote :

Run pageant, and use it to enable the key. Windows is different :(.

Revision history for this message
Aaron Bentley (abentley) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

anatoly techtonik wrote:
> Even though I am a little bit puzzled how encrypted SSH access can
> produce less overhead than HTTP I won't ask about that, because it
> doesn't solve my problem.

It is more efficient because bzr+ssh protocol supports high-level bzr
operations, whereas http supports only low-level file operations.

> I still can't see why should it ask for my private key of I am
> requesting read-only access for the branch I do not have commit
> privilege anyway.

It asks for your private key because you have told it to use SSH when
doing lp resolution, and SSH always requires authentication. If you
would like to stop bzr from using SSH when you use lp: names, you can
delete the "launchpad_username" setting from bazaar.conf and the
[Launchpad] section from authentication.conf

You can also directly use http access by supplying the full http
location, such as "http://bazaar.launchpad.net/~bzr-pqm/bzr/bzr.dev"
rather than lp:bzr.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkrepIQACgkQ0F+nu1YWqI1tgACbBkiLvYYIDbkOPSxvFNsjBrTZ
0A4AniBnXwQkLRX4rlY8Y7gOqvhD37b1
=GOw9
-----END PGP SIGNATURE-----

affects: launchpad → bzr
Revision history for this message
Martin Pool (mbp) wrote :

There are a bunch of things we could say or do based on this bug, but many of them are already covered by other bugs, or explained above. I think the one main new one is wanting to choose a key per destination host, for which see bug 701764.

Changed in bzr:
status: Incomplete → Invalid
Revision history for this message
anatoly techtonik (techtonik) wrote :

Sorry, I can't see in which bug is this addressed?

"I shouldn't be asked for my publickey for read only access."

Changed in bzr:
status: Invalid → New
Revision history for this message
Max Bowsher (maxb) wrote :

anatoly: The fact that Bazaar connects over SSH for read-only operations IF you have configured a Launchpad username is by design, and is not a bug. It is done this way because Launchpad only offers a Bazaar smart transport over SSH. Using a smart transport over SSH is a lot faster than using a dumb transport over HTTP.

Revision history for this message
anatoly techtonik (techtonik) wrote :

IIRC bzr didn't allow me to access lp: projects without configured username. Why it can't just switch do dumb transport or use some its own default public account to fetch sources in this case?

Revision history for this message
Max Bowsher (maxb) wrote :

It can and does, until you tell it you have a Launchpad username.

Revision history for this message
anatoly techtonik (techtonik) wrote :

Then there must be a warning to setup your 'private' key for write access every time you access Launchpad. But it still should allow fetching r/o sources using anonymous 'public' key.

Revision history for this message
Max Bowsher (maxb) wrote :

That's suggesting a new Launchpad feature (anonymous ssh) and two new Bazaar features (knowing at transport connection time whether you are ever going to want to do a write operation on it; using one URL for write operations and a different for read only operations).

Frankly, I don't think it's worth it.

For machines where you have a SSH key available, use it. For machines where you don't, that's why Launchpad provides http:.

This is no different to how Git or Mercurial or Subversion work regarding remote access methods.

Revision history for this message
anatoly techtonik (techtonik) wrote :

Mercurial and Subversion don't provide lp: "helpers". But I don't insist - if you want to close it, feel free to do this, but as "Won't fix.", not "Invalid". I don't use bazaar for committing anymore, but that doesn't invalidate this user story.

Revision history for this message
Vincent Ladeuil (vila) wrote :

So, there is no such thing as an anonymous key, either you use one key associated with your launchpad login or you don't set up your launchpad login. If you don't intend to commit with bzr nor push to lp nor any write operation, there is no point telling bzr what your launchpad login is.

I'll leave this bug open to output a better error message in this case.

Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Martin Pool (mbp) wrote :

On 12 January 2011 11:29, anatoly techtonik <email address hidden> wrote:
> Mercurial and Subversion don't provide lp: "helpers". But I don't insist
> - if you want to close it, feel free to do this, but as "Won't fix.",
> not "Invalid".

I guess the equivalent would be to any of

1- dispense with lp: and make people specify whether they want to use
ssh, http, or whatever
2- dispense with the "authenticated or not" flag, and make lp: just
always connect over ssh
3- further to 2, make lp: just a shortcut that you can rebind to http
if you never want an authenticated connection

I kind of like the idea of 2 or 3. They would fix a few other bugs about lp.

--
Martin

Revision history for this message
Max Bowsher (maxb) wrote :

Hmm, I don't like any of the 1, 2, 3. Any of them would be a loss of functionality.

I think anatoly's request would be suitably satisfied by implementing "bzr lp-logout" plus an additional message that reminds users of its existence when a ssh connection to bazaar.launchpad.net fails.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.