Problem Uploading My First Branch

Asked by Ian Barton

I am obviously having a bad Launchpad day here:) I have created a project and am trying to push my code to it for the first time. I have run bzr launchpad-login ian-manor-farm with no errors. When I try:

bzr push -Dhpss lp:~ian-manor-farm/mythtv-status/trunk --use-existing-dir

I get the following error:

Permission denied (publickey).
bzr: ERROR: Connection closed: please check connectivity and permissions (and try -Dhpss if further diagnosis is required)

Trying to get more info on the error by running:

bzr push -Dhpss lp:~ian-manor-farm/mythtv-status/trunk --use-existing-dir

I get the following error:

Permission denied (publickey).
bzr: ERROR: exceptions.AttributeError: 'ProtocolThreeDecoder' object has no attribute '_in_buffer'

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 857, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 802, in run
    use_existing_dir=use_existing_dir)
  File "/usr/lib/python2.5/site-packages/bzrlib/push.py", line 47, in _show_push_branch
    dir_to = bzrdir.BzrDir.open_from_transport(to_transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 798, in open_from_transport
    return format.open(transport, _found=True)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1725, in open
    return self._open(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 2605, in _open
    return remote.RemoteBzrDir(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 76, in __init__
    response = self._client.call('BzrDir.open', path)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/client.py", line 111, in call
    result, protocol = self.call_expecting_body(method, *args)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/client.py", line 124, in call_expecting_body
    method, args, expect_response_body=True)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/client.py", line 72, in _call_and_read_response
    expect_body=expect_response_body)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/message.py", line 258, in read_response_tuple
    self._wait_for_response_args()
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/message.py", line 224, in _wait_for_response_args
    self._read_more()
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/message.py", line 243, in _read_more
    self._protocol_decoder._in_buffer[:10],
AttributeError: 'ProtocolThreeDecoder' object has no attribute '_in_buffer'

bzr 1.6.1 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'push', '-Dhpss', 'lp:~ian-manor-farm/mythtv-status/trunk', '--use-existing-dir']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
plugins:
  automirror /home/ian/.bazaar/plugins/automirror [0.0.2]
  avahi /usr/lib/python2.5/site-packages/bzrlib/plugins/avahi [0.3.0dev0]
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.6.0]
  dbus /usr/lib/python2.5/site-packages/bzrlib/plugins/dbus [unknown]
  gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.95.0]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  qbzr /usr/lib/python2.5/site-packages/bzrlib/plugins/qbzr [0.9.2]
  upload /usr/lib/python2.5/site-packages/bzrlib/plugins/upload [0.1.0]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

I am using Kubuntu Intrepid patched up to date.

So what am I doing wrong?

Thanks,

Ian.

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Barry Warsaw
Solved:
Last query:
Last reply:
Revision history for this message
Barry Warsaw (barry) said :
#1

Hi Ian,

This looks, at least superficially, like a problem with your ssh keys. I see
that you have a key uploaded to your account. Please double check and make
sure that the private key you're using matches the public key that you have
registered with Launchpad.

The lp: scheme is just a shortcut for bzr+ssh so you're really making a
connection to Launchpad over ssh. If your public and private keys don't
match, you would get the permission denied error as we're seeing in your
report.

If you're sure your keys match, then we can start looking at other possible
causes.

Hope that helps!
Barry

Revision history for this message
Ian Barton (ian-manor-farm) said :
#2

Barry,

I am sure that you are right. I have several ssh keys and I suspect that bzr is using my ~/.ssh/id_rsa, which is the wrong key. What is the syntax for specifying a specific key, as in ssh -i ~/.ssh/id_launchpad <email address hidden>?

Ian.

Revision history for this message
Best Barry Warsaw (barry) said :
#3

Ian,

I asked around internally and have some recommendations for you.

There's no bzr specific way to configure this; you do it through your ssh
config file just like all other ssh configurations. So you might do something
like the following in your ~/.ssh/config file:

Host bazaar.launchpad.net
    IdentityFile ~/.ssh/id082_dsa

with the file name changed as appropriate.

It's also possibly that your local user name is not matching your Launchpad
user name, even though you've done a launchpad-login. You're using bzr 1.6.1
and in this case, you'll also want to specify a user name in your
~/.ssh/config file, e.g.:

Host bazaar.launchpad.net
    User ian-manor-farm

I hope that helps!

Revision history for this message
Ian Barton (ian-manor-farm) said :
#4

Barry,

Thanks, putting the information in my ~/.ssh/config file fixed the problem. I would suggest putting something about this on the relevant Launchpad page that tells people how to upload their packages at https://help.launchpad.net/Code/UploadingABranch#preview . I'll edit the page myself if that's OK.

Ian.

Revision history for this message
Ian Barton (ian-manor-farm) said :
#5

Thanks Barry Warsaw, that solved my question.