Maintaining PATH over SSH Connections

I’m trying to set up git on my Drobo and am running into problems setting the Drobo’s PATH variable and maintaining it over SSH connections. Git commands need to execute on the remote host, and the PATH isn’t being set properly when the Drobo is treated as a remote host.

I’ve set the PATH variable in my ~/.bashrc file to include the DroboApps git executables, and that seems to work properly when I SSH into the Drobo via Putty (e.g. ‘git init’ works fine when typed on the command line). I did need to add a command to ~/.profile to source ~/.bashrc on login.

However, using SSH through git on my host machine (e.g. ‘git clone ssh://user@drobo-ip/mnt/DroboFS/Shares/git/project.git’) results in an error “sh: git-upload-pack: not found”. Additionally, “ssh user@drobo-ip echo $PATH” shows the PATH does not include the git executable location.

Is there any method of setting the PATH such that it will be set regardless of how the user logs in?[hr]
Found the following thread where somebody had a similar problem, but wasn’t able to solve it with what was posted there.

‘Fixed’ the issue by adding symbolic links to the git executables in /usr/bin (one of the locations the PATH points to by default).

On the root account, use the following command:

ln -s /mnt/DroboFS/Shares/DroboApps/git/bin/git* .

This will allow the git executables to be used without modifying the PATH, even over non-interactive sessions.

I’d still appreciate it if anybody could provide a way to modify PATH and have it maintained over both interactive and non-interactive sessions.