bzr+ssh cannot init in the server's root directory, gives "parent directory does not exist"

Bug #416710 reported by Martin Pool
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

I managed to run a working SSH/SFTP server in Windows. I'm using Copssh. I can connect to it with ssh.exe and sftp.exe.

The following command works:
bzr init sftp://localhost/

But this one doesn't:
bzr init bzr+ssh://localhost/

I get the following error message:
bzr: ERROR: Parent directory of bzr+ssh://localhost/ does not exist.
You may supply --create-prefix to create all leading parent directories.

If I use --create-prefix, I get the following error message:
bzr: ERROR: Failed to create path prefix for bzr+ssh://localhost/

I also tried it without the trailing slash, but that doesn't make any difference.

How can I get bzr+ssh to work in Windows? Do I have to run "bzr serve" (currently I don't)?

Revision history for this message
Martin Pool (mbp) wrote :

Hi, thanks for the report.

This does seem to be a bug.

It would help if you can paste the traceback from bzr.log, whose location is shown by 'bzr version'.

This might be similar to bug 394227, but apparently not the same because that one caused a hang.

Changed in bzr:
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
besy (besy) wrote :

I attached the log file :)

Revision history for this message
Martin Pool (mbp) wrote :

Thanks for the log file. Unfortunately it's not got very much helpful information.

How did you install bzr? From source, or from an installer package?

Revision history for this message
besy (besy) wrote :

I used the installer "bzr-setup-1.17-2.exe".

Shall I try building Bazaar from source or using a different installer?

Revision history for this message
besy (besy) wrote :

I just have uninstalled Bazaar 1.17 and have installed version 1.18 from "bzr-1.18-1-setup.exe". SFTP still works and bzr+ssh still doesn't work.

However, if I execute "bzr init bzr+ssh://localhost/" now, I get a new error message:
bash: bzr: command not found
bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.

Maybe I only have to set a certain environment variable?

I attached a new log file.

Revision history for this message
besy (besy) wrote :

Hm, after adding the path to Bazaar (1.18) to the .bashrc of my cygwin profile (export PATH=$PATH:/cygdrive/c/Programme/Bazaar), I get the same error as in Bazaar 1.17. I don't know why I didn't have to modifiy the cygwin PATH environment variable with Bazaar 1.17.

I attached the new log file which is practically identical to the first log file I posted.

Revision history for this message
besy (besy) wrote :

Sorry for posting so much but finally I got bzr+ssh to work (with Bazaar 1.18).

The problem is that bzr+ssh://, in contrast to sftp://, doesn't work with the root directory. I've already testet bzr+ssh with a subdirectory before but probably when I did that the Copssh / Openssh configuration wasn't correct (and I mistakenly assumed bzr+ssh didn't work with subdirectories either).

To sum it up:
works: bzr init sftp://localhost
DOESN'T work: bzr init bzr+ssh://localhost
works: bzr init sftp://localhost/bla
WORKS: bzr init bzr+ssh://localhost/bla

I hope this narrows the problem down so it can be fixed.

Revision history for this message
Martin Pool (mbp) wrote :

Thanks for tracking it down, that will help fix it.

I think it would be a bit weird to want to init a repo in the root directory. We should handle it better but I don't see it as a very urgent bug. You probably want to say bzr+ssh://localhost/repos/ or something similar.

summary: - bzr+ssh says "parent directory does not exist" with copssh on windows
+ bzr+ssh cannot init in the server's root directory, gives "parent
+ directory does not exist"
Changed in bzr:
status: Incomplete → Confirmed
importance: Medium → Low
tags: added: hpss
Revision history for this message
Archimedes Trajano (trajano) wrote :

I also found that I have a similar issue and it is not because of the root folder. So far only SFTP from Windows to a Mac machine works, but bzr+ssh does not and yields the log message that is attached.

Revision history for this message
Andrew Bennetts (spiv) wrote :

Archimedes Trajano: thanks for that log. Your issue appears to be a different problem to me (perhaps bzr is not installed on the server?), so please file a new bug report about that rather than commenting on 416710.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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