need to specify my LP username in the branch URL in order to pqm-submit a branch hosted on Launchpad

Bug #279103 reported by Abel Deuring
2
Affects Status Importance Assigned to Milestone
Bazaar PQM Plugin
Invalid
Undecided
Unassigned

Bug Description

If I want to PQM-submit an Launchpad branch which is hosted on Launchpad, I must specify my Launchpad
user name in the public_branch parameter in ~/.bazaar/locations.conf:

public_branch = bzr+ssh://<email address hidden>/~adeuring/launchpad

Without this, I get the error

Launchpad user 'abel' doesn't have a registered SSH key
Permission denied (publickey).
bzr: ERROR: Connection closed: please check connectivity and permissions
(and try -Dhpss if further diagnosis is required)

('abel' is my local user name)

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 279103] [NEW] need to specify my LP username in the branch URL in order to pqm-submit a branch hosted on Launchpad

On Mon, 2008-10-06 at 14:36 +0000, Abel Deuring wrote:
> Public bug reported:
>
> If I want to PQM-submit an Launchpad branch which is hosted on Launchpad, I must specify my Launchpad
> user name in the public_branch parameter in ~/.bazaar/locations.conf:
>
> public_branch =
> bzr+ssh://<email address hidden>/~adeuring/launchpad
>
> Without this, I get the error
>
> Launchpad user 'abel' doesn't have a registered SSH key
> Permission denied (publickey).
> bzr: ERROR: Connection closed: please check connectivity and permissions
> (and try -Dhpss if further diagnosis is required)
>
> ('abel' is my local user name)

Doing this isn't a good idea though, as that is not a public branch,
I must be able to log in to bazaar.lp.net as "adeuring" to access
this branch.

I would recommend that you use a http:// url for this branch as
the public_branch, solving both issues.

The reason for being in this situation may still warrant a
bug report though.

Thanks,

James

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 279103] [NEW] need to specify my LP username in the branch URL in order to pqm-submit a branch hosted on Launchpad

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

Abel Deuring wrote:
> If I want to PQM-submit an Launchpad branch which is hosted on Launchpad, I must specify my Launchpad
> user name in the public_branch parameter in ~/.bazaar/locations.conf:

However, a public_branch is intended to be usable by others, so
including a username in the public branch is not a good solution, either.

Specifying the username in your SSH config should work, and perhaps we
should look at forcing lp URLs to use the configured lp username.

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

iD8DBQFI6ij00F+nu1YWqI0RAucsAJ4xTWPnUBwCUubGUFKtRiPLbiIvoACgiW7R
xd5Y0N7psHh/+O5uaIYqwLQ=
=GWSH
-----END PGP SIGNATURE-----

Revision history for this message
Abel Deuring (adeuring) wrote : Re: [Bug 279103] [NEW] need to specify my LP username in the branch URL in order to pqm-submit a branch hosted on Launchpad

On 06.10.2008 16:48, James Westby wrote:
> On Mon, 2008-10-06 at 14:36 +0000, Abel Deuring wrote:
>> Public bug reported:
>>
>> If I want to PQM-submit an Launchpad branch which is hosted on Launchpad, I must specify my Launchpad
>> user name in the public_branch parameter in ~/.bazaar/locations.conf:
>>
>> public_branch =
>> bzr+ssh://<email address hidden>/~adeuring/launchpad
>>
>> Without this, I get the error
>>
>> Launchpad user 'abel' doesn't have a registered SSH key
>> Permission denied (publickey).
>> bzr: ERROR: Connection closed: please check connectivity and permissions
>> (and try -Dhpss if further diagnosis is required)
>>
>> ('abel' is my local user name)
>
> Doing this isn't a good idea though, as that is not a public branch,
> I must be able to log in to bazaar.lp.net as "adeuring" to access
> this branch.

The point is that this branch is not publicly accessible ;) I think the
main problem is that the pqm-submit plugin does not use the parameter
launchpad_username (set to adeuring in my case).

>
> I would recommend that you use a http:// url for this branch as
> the public_branch, solving both issues.

Would this really solve the problem that bazaar.launchpad.net wants a
correct authentication, i.e., right user name and associated SSH keys?

Revision history for this message
James Henstridge (jamesh) wrote :

The usual fix is to set the user name in your ~/.ssh/config file. Something like this:

    Host bazaar.launchpad.net
        User adeuring

This way you will be able to access your branch using the public_branch name.

Revision history for this message
James Westby (james-w) wrote :

On Mon, 2008-10-06 at 15:12 +0000, Abel Deuring wrote:
> The point is that this branch is not publicly accessible ;) I think the
> main problem is that the pqm-submit plugin does not use the parameter
> launchpad_username (set to adeuring in my case).

It's probably just using the public_branch location verbatim, and
this wasn't stored including the user name.

> Would this really solve the problem that bazaar.launchpad.net wants a
> correct authentication, i.e., right user name and associated SSH keys?

The HTTP URI doesn't need any authentication, so it doesn't need to
worry about a user name and SSH key.

It doesn't deal with the general problem of the local and LP usernames
being different though. That's not a problem specific to bzr, but bzr
could perhaps do better at handling it, as ssh to bazaar.launchpad.net
via bzr should generally use your launchpad user name if one is set.

Thanks,

James

Revision history for this message
Martin Pool (mbp) wrote :

I think there are separate issues here:

1- what should be specified as the public_location of a branch that's not available to the general public? I think it's reasonable to give an ssh url (or an lp: url that resolves to one), but you typically should not include a username unless you intend everyone to log in as that user.

2- lp: urls should use the configured Launchpad username - presumably they're not specifying one, and it's just turning into bzr+ssh://bazaar.launchpad.net/.... - but this seems to be the same as bug 279037.

Revision history for this message
Martin Pool (mbp) wrote :

I don't think this is a bug in bzr-pqm itself, but please reopen if there's anything here beyond bug 279032.

Changed in bzr-pqm:
status: New → Invalid
Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 279103] Re: need to specify my LP username in the branch URL in order to pqm-submit a branch hosted on Launchpad

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

Martin Pool wrote:
> I think there are separate issues here:
>
> 1- what should be specified as the public_location of a branch that's
> not available to the general public? I think it's reasonable to give an
> ssh url (or an lp: url that resolves to one), but you typically should
> not include a username unless you intend everyone to log in as that
> user.

Fully agreed. A public branch location should be usable by all who have
access to that branch.

> 2- lp: urls should use the configured Launchpad username - presumably
> they're not specifying one, and it's just turning into
> bzr+ssh://bazaar.launchpad.net/.... - but this seems to be the same as
> bug 279037.

I would prefer not to make lp URLs special. It seems like the wrong layer.

For users with differing launchpad and local usernames, a bzr+ssh URL as
you specified in 1. will not work, because Bazaar will use their local
username. Users can typically configure SSH, but not all users can, and
most would expect launchpad-login to have that effect.

So I propose that we provide a per-host configuration mechanism that
launchpad-login can hook into.

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

iD8DBQFI6v6m0F+nu1YWqI0RAiveAJkBcDttFAaWcbaPp5sgKDkEFGm/UwCgiQN1
0j0z7Cfbe+YWU3VlqbS6Xuc=
=jAuj
-----END PGP SIGNATURE-----

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.