Committing a checkout as a different user?
John Arbash Meinel
john at arbash-meinel.com
Tue Nov 20 20:31:39 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
> Iwan Vosloo wrote:
>> Hi there,
>
...
>> But now we have a checkout, which remembers (using the bzr+ssh url) the
>> branch location and user name as whom it was originally checked out. So
>> we can only ever commit (and thus do the automatic push) as the user who
>> originally checked it out.
>
>> Is there a way you can specify as which user the bzr+ssh must happen for
>> "bzr commit" or (less important) "bzr update"?
>> (It's nice that the rest of the branch URL stays the same, ideally we
>> don't want to lose that.)
>
>> - Iwan
I missed the second half of this.
I don't know of any way to set an SSH user through an environment variable. As
someone mentioned, you can use "bzr+ssh://user@", but that means you would have
to switch each time, which is a bit of a pain.
Another possibility, would be to have a generic user on the host machine, and
just have both of your users use ssh-keys. Then the generic user can have both
keys listed as allowed.
I know for me, when I ssh into a machine I have "ForwardAgent=True" which means
that the remote side gets a socket that it can use to check keys. So the same
"sudo su root" would also have access to that socket, and thus my local
ssh-agent can provide the credentials to log into the remote machine.
I can break this down if it is a bit confusing.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHQ0QrJdeBCYSNAAMRAkxnAJsEERkG9Xlhw6572wA0gT5cq18xKQCeJjFp
gjCahejnBO6rsBNcFO2ElKg=
=1pVp
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list