how I can trace bazaar integration?

Asked by loki

I've installed Bazaar on local server, generally it works fine. But I can't use bazaar with it.

I use same public key for launchpad.net and launchpad.dev. But in first case it works fine, in seconde i get:

C:\Documents and Settings\Loki\support>bzr push sftp://<email address hidden>/~loki/supportstuff/trunk
Connected (version 2.0, client OpenSSH_4.7p1)
Authentication (publickey) failed.
SSH <email address hidden> password:

How I can trace this process to find what's wrong?

Question information

Language:
Spanish (Spain) Edit question
Status:
Answered
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Tim Penhey (thumper) said :
#1

On Sat, 14 Nov 2009 03:07:25 loki wrote:
> New question #89996 on Launchpad Bazaar Integration:
> https://answers.launchpad.net/launchpad-code/+question/89996
>
> I've installed Bazaar on local server, generally it works fine. But I can't
> use bazaar with it.
>
> I use same public key for launchpad.net and launchpad.dev. But in first
> case it works fine, in seconde i get:
>
> C:\Documents and Settings\Loki\support>bzr push
> sftp://<email address hidden>/~loki/supportstuff/trunk Connected (version 2.0,
> client OpenSSH_4.7p1)
> Authentication (publickey) failed.
> SSH <email address hidden> password:

You should be pushing to bazaar.launchpad.net not just launchpad.net.

Also, you'll get much better performance if you use bzr+ssh.

Have you told bzr about your launchpad login?

You can do this with:
  bzr lp-login loki

Then you can do:
  bzr push lp:~loki/supportstuf/trunk

And this will use bzr+ssh.

tim

Revision history for this message
loki (sergiy-vynnychenko) said :
#2

I'm using local server, so there is no difference between bazaar.launchpad.DEV and launchpad.DEV.

There is NO problem with launchpad.NET! It works fine.

problem with local server. I need to check why it ignores submited publick key, but i don't know how to do it.

the actual question is "how i can debug this process on my server"?

Revision history for this message
Paul Hummer (rockstar) said :
#3

It's pretty common for your browser to add line breaks in the field where you add your ssh-key so it's not actually getting added correctly. There is a script at utilities/make-lp-user that will help you make a user in lp and add the ssh key properly. Do a `make schema` and then use that script to create a new user on launchpad.dev that is the same as the same username as the one you have in Launchpad (so you don't have to change bazaar configs) and it'll add your ssh key from ~/.ssh/id_rsa.pub to the user you've just created in your local instance.

Give that a try, see if it works.

Revision history for this message
loki (sergiy-vynnychenko) said :
#4

I've generated private/public keys manually with puttygen (windows app)
on windowsXP client i've registered private key with Pageant
on server i've put public key to ~/.ssh/id_rsa.pub and ~/.ssh/autorized_keys

authentication with Putty works fine.
also i've tested ordinary bazaar repository - branch and push works fine with it.

same public key i've put to my account on lauchpad.dev (there are no break line - i'm sure)

then i've decided to test bazaar.launchpad.dev branch
C:\Documents and Settings\Loki\support>bzr push bzr+ssh://<email address hidden>/~loki/+junk/test2 --create-prefix
Connected (version 2.0, client OpenSSH_4.7p1)
Authentication (publickey) successful!
Secsh channel 1 opened.
bzr: ERROR: Permission denied: "~loki/+junk/test2/": : [Errno 13] Permission denied: '/~loki'

it seems it used authentication from my ordinary ubuntu account like on scheme
http://sial.org/howto/openssh/publickey-auth/ssh-client-server.png
is thiss normal?

Revision history for this message
Gavin Panella (allenap) said :
#5

Could you try the following:

1. Start Launchpad with make run_all
2. Run: utilities/make-lp-user fred
3. Make sure there's no entry in ~/.ssh/config for bazaar.launchpad.dev
4. Run: bzr info bzr+ssh://<email address hidden>:5022/

All being well, you should get:

  bzr: ERROR: Not a branch: "bzr+ssh://<email address hidden>:5022/".

Revision history for this message
loki (sergiy-vynnychenko) said :
#6

server:

________________________________________________________
1.
loki@ubu:~/launchpad/lp-branches/devel/utilities$ ./make-lp-user fred
username: fred
email: <email address hidden>
password: test
teams:
Registered SSH key: /home/loki/.ssh/id_rsa.pub
loki@ubu:~/launchpad/lp-branches/devel/utilities$
________________________________________________________
2.
loki@ubu:~/launchpad/lp-branches/devel/utilities$ vi /home/loki/.ssh/config

  1 GSSAPIAuthentication no
  2 #Host bazaar.launchpad.dev
  3 # Hostname launchpad.dev
  4 # HostKeyAlias bazaar.launchpad.dev
  5 # User mark
  6 # Port 5022
  7 # IdentityFile ~/.ssh/launchpad_id_dsa
_________________________________________________________
3.
C:\Documents and Settings\Loki\support>bzr info bzr+ssh://<email address hidden>:5022
bzr: ERROR: Unable to connect to SSH host bazaar.launchpad.dev:5022; (10061, 'Connection refused')

and same on linux:
loki@ubu:~/launchpad/lp-branches/devel/utilities$ bzr info bzr+ssh://<email address hidden>:5022
ssh: connect to host bazaar.launchpad.dev port 5022: Connection refused
bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.

and
/etc/init.d/ssh restart
has no effect

ok, something not well

Revision history for this message
loki (sergiy-vynnychenko) said :
#7

btw

on default port FRED not works!

C:\Documents and Settings\Loki\support>bzr info bzr+ssh://<email address hidden>
Connected (version 2.0, client OpenSSH_4.7p1)
Authentication (publickey) failed.

but LOKI works:

C:\Documents and Settings\Loki\support>bzr info bzr+ssh://<email address hidden>
Connected (version 2.0, client OpenSSH_4.7p1)
Authentication (publickey) successful!
Secsh channel 1 opened.
bzr: ERROR: Not a branch: "bzr+ssh://<email address hidden>/".

bcs loki has public key on ~/.ssh/authorized_keys

Revision history for this message
Gavin Panella (allenap) said :
#8

Hi loki,

~/.ssh/authorized_keys does not enter into this, because Launchpad runs its own SSH server, quite separate from the system SSH server.

I notice that you're running the ssh command from a Windows machine. I suggest you try the steps again from the same host that is running Launchpad. In the default development configuration, Launchpad only listens on the loopback (localhost) network interface, and is not available remotely. If you want to make Launchpad available over the network, you'll need to set up a different configuration (grep for LPCONFIG as a start).

By the way, we only support setting up the development environment of Launchpad. We simply do not have the resources to help put instances of Launchpad into production. It is a large and complex system, and needs a dedicated team of engineers to maintain it; it is a significant undertaking.

If you are seeking to run a private Launchpad, I heartily encourage you to ask about privacy features and commercial options on Launchpad.net; it's likely to be *much* cheaper than doing it yourself, and has the support of the team that built it.

Gavin.

Can you help with this problem?

Provide an answer of your own, or ask loki for more information if necessary.

To post a message you must log in.