You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mattius McLaughlin <Ma...@pmc-sierra.com> on 2012/06/08 23:35:58 UTC
Environment variables in .subversion/config
Hi,
I'd like to use a shared config file for multiple users, but I'm in a
bit of a bind when it comes to ssh identity files. I'd like to have a
line like
[tunnels]
ssh = $SVN_SSH ssh -q -i $HOME/.ssh/ssh-identity
but svn cannot expand environment variables (or ~) from this file.
Warning: Identity file $HOME/.ssh/ssh-identity not accessible: No such
file or directory.
svn: To better debug SSH connection problems, remove the -q option from
'ssh' in the [tunnels] section of your Subversion configuration file.
svn: Network connection closed unexpectedly
It would seem I can only have lines like
[tunnels]
ssh = $SVN_SSH ssh -q -i /home/user1/.ssh/ssh-identity
which prevents a shared config.
Has anyone run across this before? How did you get around this?
Thanks
--Mattius McLaughlin
Re: Environment variables in .subversion/config
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Mattius McLaughlin wrote on Fri, Jun 08, 2012 at 14:35:58 -0700:
> Hi,
>
> I'd like to use a shared config file for multiple users, but I'm in a
> bit of a bind when it comes to ssh identity files. I'd like to have a
> line like
>
> [tunnels]
> ssh = $SVN_SSH ssh -q -i $HOME/.ssh/ssh-identity
BTW, have you tried
[tunnels]
ssh = $SVN_SSH ssh -q -i ~/.ssh/ssh-identity
?
Re: Environment variables in .subversion/config
Posted by Mattius McLaughlin <Ma...@pmc-sierra.com>.
On 06/08/12 23:18, Daniel Shahaf wrote:
> Mattius McLaughlin wrote on Fri, Jun 08, 2012 at 14:35:58 -0700:
>> bit of a bind when it comes to ssh identity files. I'd like to have a
>> line like
>>
>> [tunnels]
>> ssh = $SVN_SSH ssh -q -i $HOME/.ssh/ssh-identity
>>
>> It would seem I can only have lines like
>>
>> [tunnels]
>> ssh = $SVN_SSH ssh -q -i /home/user1/.ssh/ssh-identity
> Untested, but:
>
> [tunnels]
> ssh = $SVN_SSH sh -c 'ssh -q -i $HOME/.ssh/ssh-identity "$@"' -s
This works nicely, thank you. I tried both $HOME and ~, but the client
doesn't resolve either.
Re: Environment variables in .subversion/config
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Mattius McLaughlin wrote on Fri, Jun 08, 2012 at 14:35:58 -0700:
> bit of a bind when it comes to ssh identity files. I'd like to have a
> line like
>
> [tunnels]
> ssh = $SVN_SSH ssh -q -i $HOME/.ssh/ssh-identity
>
> It would seem I can only have lines like
>
> [tunnels]
> ssh = $SVN_SSH ssh -q -i /home/user1/.ssh/ssh-identity
Untested, but:
[tunnels]
ssh = $SVN_SSH sh -c 'ssh -q -i $HOME/.ssh/ssh-identity "$@"' -s
or perhaps leave ~/.subversion/config untouched and use the following in
~/.ssh/config:
Host *
IdentityFile ~/.ssh/ssh-identity
> Thanks
> --Mattius McLaughlin
>