`bzr push` fails with error 530 (login incorrect)

Bug #159997 reported by Andrea Corbellini
2
Affects Status Importance Assigned to Milestone
Bazaar
Incomplete
Undecided
Unassigned
bzr (Ubuntu)
Incomplete
Undecided
Vincent Ladeuil

Bug Description

bzr doesn't ask me the password so I'm not able to log in correctly on my ftp server.

Revision history for this message
Andrea Corbellini (andrea.corbellini) wrote :
Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 159997] Re: `bzr push` fails with error 530 (login incorrect)

Are you specifying a username in the ftp url? By default Bazaar opens
an anonymous connection.

Changed in bzr:
status: New → Incomplete
Revision history for this message
Andrea Corbellini (andrea.corbellini) wrote :

Yes: bzr push ftp://username@host/...
In _create_connection (transport/ftp.py) credentials and self._password are None. I've solved the problem adding password='' after the call to mutter(str).

Revision history for this message
Vincent Ladeuil (vila) wrote :

You shouldn't need to do that, you can use:

  bzr push ftp://user:@host/ (note the ':' followed by nothing to specify an empty password)

or
  bzr push ftp://user@host/

and in that case bzr *must* promt you for a password

Can you confirm that both the above solutions work when reverting you change ?

Revision history for this message
Andrea Corbellini (andrea.corbellini) wrote :

Only the first (ftp://user:@host) works for me, but in an older version of bzr (0.15-0ubuntu2) i could use also the second way.
Thanks for the help anyhow.

Revision history for this message
Vincent Ladeuil (vila) wrote :

That's pretty strange, our test suite explicitly test that bzr prompt you if you supply a user but no password, what OS and what version of bzr are you using ?

Changed in bzr:
assignee: nobody → v-ladeuil
status: New → Incomplete
Revision history for this message
Andrea Corbellini (andrea.corbellini) wrote :

andrea@hivepad:~$ bzr --version
Bazaar (bzr) 0.90.0
  Python interpreter: /usr/bin/python 2.5.1.final.0
  Python standard library: /usr/lib/python2.5
  bzrlib: /usr/lib/python2.5/site-packages/bzrlib
  Bazaar configuration: /home/andrea/.bazaar
  Bazaar log file: /home/andrea/.bzr.log

Copyright 2005, 2006, 2007 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

andrea@hivepad:~$ uname -a
Linux hivepad 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686 GNU/Linux
andrea@hivepad:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 7.10
Release: 7.10
Codename: gutsy
andrea@hivepad:~$

Revision history for this message
Vincent Ladeuil (vila) wrote :

Ok, this has been fixed in bzr.0.91, this is a duplicate of #137044.

Sorry, I should have think about it earlier.

If you want to stay with bzr.0.90 the fix is pretty simple:

--- bzrlib/transport/ftp.py 2007-08-22 01:41:24 +0000
+++ bzrlib/transport/ftp.py 2007-09-05 07:27:49 +0000
@@ -130,7 +130,7 @@
             connection = ftplib.FTP()
             connection.connect(host=self._host, port=self._port)
             if self._user and self._user != 'anonymous' and \
- password is not None: # '' is a valid password
+ password is None: # '' is a valid password
                 get_password = bzrlib.ui.ui_factory.get_password
                 password = get_password(prompt='FTP %(user)s@%(host)s password',

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.