Problem Uploading My First Branch

Asked by Ian Barton on 2009-01-09

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/", line 857, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 499, in run_argv_aliases
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 802, in run
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 47, in _show_push_branch
    dir_to = bzrdir.BzrDir.open_from_transport(to_transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 798, in open_from_transport
    return, _found=True)
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 1725, in open
    return self._open(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 2605, in _open
    return remote.RemoteBzrDir(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 76, in __init__
    response ='', path)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/", line 111, in call
    result, protocol = self.call_expecting_body(method, *args)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/", line 124, in call_expecting_body
    method, args, expect_response_body=True)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/", line 72, in _call_and_read_response
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/", line 258, in read_response_tuple
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/", line 224, in _wait_for_response_args
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/", line 243, in _read_more
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'
  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
    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?



Question information

English Edit question
Launchpad itself Edit question
No assignee Edit question
Solved by:
Barry Warsaw
Last query:
Last reply:
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

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

Hope that helps!

Ian Barton (ian-manor-farm) said : #2


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>?


Best Barry Warsaw (barry) said : #3


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:

    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.:

    User ian-manor-farm

I hope that helps!

Ian Barton (ian-manor-farm) said : #4


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 . I'll edit the page myself if that's OK.


Ian Barton (ian-manor-farm) said : #5

Thanks Barry Warsaw, that solved my question.