Put Bazaar behind a password
John Arbash Meinel
john at arbash-meinel.com
Wed Jun 13 15:31:23 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jason Merrill wrote:
> I'm wondering what is the easiest way to put bazaar behind a password in such a
> way that I can push and pull. I'd like to serve from a windows XP machine, and
> I've been having some trouble getting OpenSSH running on it. Is there a way to
> put the smartserver (bzr serve) behind a password? Is there a way to serve a
> branch with apache in such a way that others can push and pull?
You can use the smart server for that, and use a .htaccess file to have it
password protected. (Note that you probably also want to use https:// so that
the passwords aren't sent in plain-text).
The file 'doc/http_smart_server.txt' describes how to do this. It is a little
bit harder than it should be, mostly because we should probably bundle some of
the wsgi wrappers that we recommend. (Simply putting them into contrib/ or
tools/ or somesuch). They are generally small, so having to search for them
online is probably not worthwhile.
>
> If sftp is the way to go, is there a simpler way to set it up on windows than
> using OpenSSH? All I need it for at this point is bazaar.
>
I've never gotten SSH setup on Windows, though I've heard of people succeeding.
> Somewhat as an aside, I've been playing around with bzr+ssh a bit, but without
> much success. Is there any documentation for using this protocol? On an OS X
> machine, I've served a branch using bzr serve, and can access it fine with the
> bzr: protocol, but when I do bzr+ssh: it just hangs.
>
> Cheers,
>
> Jason Merrill
I've had good success with bzr+ssh, but you have to make sure your paths are
correct. Reading your comment, you may be confused about how bzr+ssh works. Are
you trying to run a "bzr serve" server, and then connect to that using "bzr
something bzr+ssh://host:4155" ?
The idea of "bzr+ssh://" is that it connects to the other machine over ssh, and
then spawns its own bzr process to communicate with. So you don't need 'bzr
serve' running. (You may already realize this, and I just read your statement
wrong).
What I have seen with "bzr+ssh://" on my Mac is:
a) ssh connect taking a surprising length of time. I don't know why it is,
though. Also, I've never seen it hang, just take several seconds when I would
have expected sub-second.
b) Path issues. I've started using www.MacPorts.org to install stuff, because
it makes my life easier. However it seems that it puts python2.4 in
/opt/local/bin/ which is not on the default search path. So doing "ssh
localhost bzr log /test/" was failing with not being able to find python2.4
(the python in the search path is Mac's default 2.3).
To get it to work I did:
cd /usr/bin
sudo ln -s /opt/local/bin/python2.4
sudo ln -s /opt/local/Library/Frameworks/Python.framework/Versions/2.4/bin/bzr
Yeah, I don't know why macports python installs things in such a horrible path.
Also, the path when doing 'ssh localhost command' seems to be restricted to:
/usr/bin:/bin:/usr/sbin:/sbin
And I haven't figured out how to expand that at all for a single user, without
effecting the whole system.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGb/+7JdeBCYSNAAMRAvPWAJ4uhbhDhe2M7ZUT3V2ONqLp5VbMmQCfUtQL
OO0yjW1CPKVB1e9F103VWxc=
=l9NJ
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list