can't do bzr push lp:lge

Asked by leanid chaika

on my Ununtu no such problem. On Windows mashine from my work can't push changes to lp.
1. I regen my rsa key pair add to launch pad acount.
2. do bzr lp-login leanid-chaika
3. try bzr push lp:lge
result:
Permission denied (publickey).
ConnectionReset reading response for 'BzrDir.open_2.1', retrying
Permission denied (publickey).
bzr: ERROR: Connection closed: Unexpected end of message. Please check connectiv
ity and permissions, and report a bug if problems persist.
4. try to connect with ssh
result:
$ ssh -v <email address hidden>
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /c/Users/leanid.chaika/.ssh/config
debug1: Applying options for bazaar.launchpad.net
debug1: Connecting to bazaar.launchpad.net [91.189.90.11] port 22.
debug1: Connection established.
debug1: identity file c:/Users/leanid.chaika/.ssh/id_rsa type 1
debug1: Remote protocol version 2.0, remote software version Twisted
debug1: no match: Twisted
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Host 'bazaar.launchpad.net' is known and matches the RSA host key.
debug1: Found key in /c/Users/leanid.chaika/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: c:/Users/leanid.chaika/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
No shells on this server.
debug1: channel 0: free: client-session, nchannels 1
Connection to bazaar.launchpad.net closed.
debug1: Transferred: stdin 0, stdout 0, stderr 44 bytes in 0.2 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 235.3
debug1: Exit status -1

I see - debug1: Authentication succeeded (publickey). My user on workstation leanid.chaika on launchpad(leanid-chaika)
I use windows 7, bzr 2.5.0 (with bandled python)

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
leanid chaika
Solved:
Last query:
Last reply:

This question was originally filed as bug #1012672.

Revision history for this message
Martin Packman (gz) said :
#1

This seems to be an issue with the key setup on your windows machine rather than a bug in bzr.

Revision history for this message
Martin Packman (gz) said :
#2

If you run try setting the BZR_SSH to the path of your ssh executable then trying to push, what happens? By default, the windows bzr uses paramiko, which only looks for putty's agent pageant for public keys, not in any .ssh folders on your system.

Revision history for this message
John A Meinel (jameinel) said :
#3

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

On 6/13/2012 4:45 PM, Martin Packman wrote:
> Question #200316 on Bazaar changed:
> https://answers.launchpad.net/bzr/+question/200316
>
> Status: Open => Answered
>
> Martin Packman proposed the following answer: If you run try
> setting the BZR_SSH to the path of your ssh executable then trying
> to push, what happens? By default, the windows bzr uses paramiko,
> which only looks for putty's agent pageant for public keys, not in
> any .ssh folders on your system.
>

I think we actually do look in $HOME/.ssh or some place like that. I
thought I remembered it being C:/Users/jameinel/.ssh/

IIRC we set that up directly in bzrlib/transport/ssh.py (sftp?)
so it is something we do for our Paramiko connection, not something
that paramiko itself does.

John
=:->

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

iEYEARECAAYFAk/YqzAACgkQJdeBCYSNAANDvgCePCZUCoeiplkS18sZ0rD3JLiW
0b0Ani/z0yRsb3ldjCx74ZkHKYDwUrlx
=udL7
-----END PGP SIGNATURE-----

Revision history for this message
leanid chaika (leanid-chaika) said :
#4

I try set BZR_SSH to c:\Program Files (x86)\Git\bin\ssh.exe, check %BZR_SSH% and try bzr push lp:lge result:
same error message.

What else I can try?

I double check my rsa key pair and it works with git. c:/Users/.../.ssh/ <- here I generate key that work for git(both from console and TortuiseGit) and I try use same key for bzr.

Revision history for this message
leanid chaika (leanid-chaika) said :
#5

I remove Git (both git console version and TortoiseGit) restart Windows and bzr - works well! )))

Revision history for this message
Matthias Ronge (matthias-ronge) said :
#6

Same here: As soon as I installed ToroiseGit and Git console application on my windows system, Bazaar stopped working, showing the same error message as said above.

When trying to uninstall Git, I got a message box: “The following applications use files that need to be removed, please close them”, that within 4 times listed ‘ssh.exe’.

Revision history for this message
PhiLho (philho) said :
#7

Good thread, particularly the last answers of leanid chaika and Matthias Ronge.

I too had bzr push to stop working suddenly. I tried to set BZR_SSH to my plink.exe path, without improvement (I have set GIT_SSH and SVN_SSH this way).
I didn't want to uninstall Git (I need it to pull projects), so I just went to git/bin and renamed ssh.exe to ssh_git.exe, and suddenly bzr push worked again... :-)
I don't understand why the fact that Bazaar finds ssh.exe in the path makes it to try a different authentication method. :-( (regardless of the BZR_SSH environment variable, apparently).

For the record:

> bzr push
Using saved push location: bzr+ssh://bazaar.launchpad.net/~philho/%2Bjunk/Java/
Permission denied (publickey).
ConnectionReset reading response for 'BzrDir.open_2.1', retrying
Permission denied (publickey).
bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.

> set | grep SSH
GIT_SSH=C:\PrgWin\Net\Putty\plink.exe
SVN_SSH=C:\PrgWin\Net\Putty\plink.exe

> set BZR_SSH=C:\PrgWin\Net\Putty\plink.exe

> bzr push
Using saved push location: bzr+ssh://bazaar.launchpad.net/~philho/%2Bjunk/Java/
Server refused our key
FATAL ERROR: Disconnected: No supported authentication methods available
ConnectionReset reading response for 'BzrDir.open_2.1', retrying
Server refused our key
FATAL ERROR: Disconnected: No supported authentication methods available
bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.

(slightly different message.... Pageant is running, as usual.)
(rename ssh.exe from git/bin)

> bzr push
Using saved push location: bzr+ssh://bazaar.launchpad.net/~philho/%2Bjunk/Java/
Connected (version 2.0, client Twisted)
Authentication (publickey) successful!
Secsh channel 1 opened.
Pushed up to revision 104.

(sigh)

Revision history for this message
Dan Mendes (daniel-d-mendes) said :
#8

This should be added to the https://doc.openerp.com/v6.1/developer/01_getting_started/#windows page.

I lost almost an hour tracking this down. There is a conflict with git ssh.exe on windows systems.