bzr+ssh keys in windows?

Asked by Jonathan Jesse

Is there a way to use bzr+ssh in launchpad? i have a key that i have generated via puttygen and it is in my putty folder. how do use bzr and ssh to work w/ launchpad in Windows?
thanks

Jonathan

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Jonathan Jesse
Solved:
Last query:
Last reply:
Revision history for this message
Jonathan Jesse (jjesse) said :
#1

Thought I might as well just try it to see what happens.

bzr checkout lp:~jjesse/keep/keep-doc1 prompted me for this username and password. Upon typing in the password for the key I created via puttygen and stored at c:\program files\putty\ I think I might have a bug. would be willing to change this to a bug report if that is correct.

Here is the output of .bzr.log

this is a debug log for diagnosing/reporting problems in bzr
you can delete or truncate this file, or include sections in
bug reports to https://bugs.launchpad.net/bzr/+filebug

0.203 encoding stdout as sys.stdout encoding 'cp437'
0.204 bzr arguments: [u'checkout', u'lp:~jjesse/keep/keep-doc1']
0.205 looking for plugins in C:/Users/Jonathan/AppData/Roaming/bazaar/2.0/plugins
0.205 looking for plugins in C:/Program Files/Bazaar/plugins
0.240 encoding stdout as sys.stdout encoding 'cp437'
2.482 falling back to default implementation
2.483 failed to load system host keys: [Errno 2] No such file or directory: 'C:\\Users\\Jonathan/.ssh/known_hosts'
[ 4152] 2008-05-15 23:12:05.684 INFO: Connected (version 2.0, client Twisted)
3.132 encoding stdout as sys.stdout encoding 'cp437'
[ 4152] 2008-05-15 23:12:09.305 INFO: Authentication type (password) not permitted.
6.368 Traceback (most recent call last):
  File "bzrlib\commands.pyc", line 846, in run_bzr_catch_errors
  File "bzrlib\commands.pyc", line 802, in run_bzr
  File "bzrlib\commands.pyc", line 504, in run_argv_aliases
  File "bzrlib\builtins.pyc", line 1018, in run
  File "bzrlib\bzrdir.pyc", line 813, in open_tree_or_branch
  File "bzrlib\bzrdir.pyc", line 691, in open
  File "bzrlib\bzrdir.pyc", line 728, in open_from_transport
  File "bzrlib\lazy_import.pyc", line 125, in __call__
  File "bzrlib\transport\__init__.pyc", line 1658, in do_catching_redirections
  File "bzrlib\bzrdir.pyc", line 705, in find_format
  File "bzrlib\bzrdir.pyc", line 1466, in find_format
  File "bzrlib\bzrdir.pyc", line 2450, in probe_transport
  File "bzrlib\smart\medium.pyc", line 419, in protocol_version
  File "bzrlib\smart\protocol.pyc", line 613, in query_version
  File "bzrlib\smart\protocol.pyc", line 480, in call
  File "bzrlib\smart\protocol.pyc", line 625, in _write_args
  File "bzrlib\smart\medium.pyc", line 303, in accept_bytes
  File "bzrlib\smart\medium.pyc", line 658, in _accept_bytes
  File "bzrlib\smart\medium.pyc", line 533, in _accept_bytes
  File "bzrlib\smart\medium.pyc", line 556, in _ensure_connection
  File "bzrlib\transport\ssh.pyc", line 329, in connect_ssh
  File "bzrlib\transport\ssh.pyc", line 317, in _connect
  File "bzrlib\transport\ssh.pyc", line 519, in _paramiko_auth
ConnectionError: Connection error: Unable to authenticate to SSH host as <email address hidden> Bad authentication type (allowed_types=['publickey'])

6.370 return code 3

I think the problem is the check for 'C:\\Users\\Jonathan/.ssh/known_hosts' which will never exist in a windows system. Note how you a combination of \ and / mixing the Unix/Linux way and the Windows way. Like I said this may be a bug and I would be more then willing to open up a bug.

Thanks,

JOnathan

PS: BTW Running Vista Business Edition with all updates, including SErvice Pack 1

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

You need to be running the putty ssh key agent called Pageant. It usually adds an icon to the system tray on the bottom right. Then you right click on the agent and say that you want to add a key. You browse for the file and add your password.

The reason it is failing is because Launchpad doesn't let you use passwords for authentication, you have to use an ssh-key. When you enter a password at the prompt, that is just a regular password, not the password for your key.

Pageant, putty, and bzr don't know where to find your key unless you add it to pageant manually.

Revision history for this message
Jonathan Jesse (jjesse) said :
#3

John,

Thank you very much for your answer to this question. It works just like I want it to.

Jonathan

Revision history for this message
Shah Japan (jsh.axelor) said :
#4

Hi John,

I was not knowing from where I can get the pageant,
finally googled and got it is the part of Putty it self.

Thank you very much.

Revision history for this message
Enrique Ramirez (enriquein) said :
#5

Same problem on Windows. I was a bit confused since I was able to branch and all in Linux and didn't need to configure anything else. I strongly suggest that a link to Pageant as well as information as to why you need it on Windows clients be added to https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair

Thanks for the info :)

Revision history for this message
kovax (kovax3) said :
#6

use puttygen.exe pageant.exe

Revision history for this message
himanshu (himanshup) said :
#7

i am new here and i followed instructions but when i used pageant.exe - it shows access denied.
i ran the command bzr branch lp:libmysql
i want to download mysql connector/c
thanks in advance

Revision history for this message
Martin Pool (mbp) said :
#8

Can you please post the entire error you're getting?

If you're getting ssh access denied errors check
https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair

Revision history for this message
himanshu (himanshup) said :
#9

i have followed the link u just posted. i registered my ssh key. added the key in pagenat.exe and kept running it in tray. i logged in with the command bzr launchapd-login <username>

now i run the command "bzr branch lp:libmysql" and then it shows the error

C:\Windows\system32>bzr branch lp:libmysql
Connected (version 2.0, client Twisted)
bzr: ERROR: [Error 5] Access is denied: 'c:\\users\\himanshu\\appdata\\local\\te
mp\\tmpnoadoa.pag'

C:\Windows\system32>

i tried a lot its not working. and bzr launchapd-login command is also not working now.

Revision history for this message
Martin Pool (mbp) said :
#10

hi,
 i think you're hitting bug 820805. there are some suggestions there as to what to check or try.

Revision history for this message
himanshu (himanshup) said :
#11

thanks martin for help.
gen users keep their bzr directory in \program files\ and actually when we run both programs by normal privs then
bzr says access denied for creating access and then we elevate and hit the bug!
thanks i just changed to another directory in another drive.

Revision history for this message
himanshu (himanshup) said :
#12

now its not showing any error message but it is just working

D:\devdirs>bzr branch lp:libmysql
Connected (version 2.0, client Twisted)
Authentication (publickey) successful!
Secsh channel 1 opened.
_

and cursor is waiting for last around 30 mins.
!

Revision history for this message
Martin Pool (mbp) said :
#13

On 18 November 2011 20:55, himanshu <email address hidden> wrote:
> Question #33232 on Bazaar changed:
> https://answers.launchpad.net/bzr/+question/33232
>
> himanshu posted a new comment:
> now its not showing any error message but it is just working
>
> D:\devdirs>bzr branch lp:libmysql
> Connected (version 2.0, client Twisted)
> Authentication (publickey) successful!
> Secsh channel 1 opened.
> _
>
> and cursor is waiting for last around 30 mins.

maybe there is a firewall between you and launchpad?

--
Martin