Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm working on a project on a server machine where git is not available. This is likely not going to change in a close future. I wonder if it is possible to use my local installation of git to work on a repository on the server through SSH, for example, doing things like:

git add -A --target ssh://[email protected]/my/repo

Note: I understand "remote repo" is a bad choice of words since the term has a meaning in git but I hope you understand what I mean.

The server is running SunOS 5.10 and is using pkg.

share|improve this question
    
You can simply install git on the remote server with user rights. That turns your pseudo-remote repo into a real repository that can be used from you local machine like any other remote repo via SSH. –  Marco Aug 1 '12 at 12:26
add comment

2 Answers

You will need to gain administration access to the machine in order to install Git, you will not be able to use Git on the computer until the (at minimum) core utilities are installed.

share|improve this answer
1  
That's not correct. Git does not need administrator privileges. Being ordinary user is totally sufficient. –  Marco Aug 1 '12 at 12:30
    
You'd still need super user privileges to install it though, but not to use it. –  Daniel Groves Aug 1 '12 at 12:32
1  
No, you don't. Configure it with --prefix=/home/someuser/.local and after that make && make install runs fine as a user. That works also on SunOS 5.10, I have done it! –  Marco Aug 1 '12 at 12:33
    
@Marco Out of interest then, should that work on any Linux-based box? –  Daniel Groves Aug 1 '12 at 12:38
1  
Yes. If the sysadmin didn't configure an extraordinarily strict environment (e.g. noexec on the partition) this works on SunOS, Linux, FreeBSD and all other Unix systems (if a compiler is installed). –  Marco Aug 1 '12 at 12:39
show 1 more comment

The simplest way would be to install git on the remote machine. That way you can use the repository in the same way as any other repository via SSH.

You don't need admin privileges to install git. Simple use --prefix=<some_dir> where you have write access in <some_dir>:

./configure --prefix=/home/me/.local
make
make install

And make sure /home/me/.local/bin is in your PATH.

share|improve this answer
    
Unfortunately, I don't even have build tools on the machine. –  Zeta Two Aug 1 '12 at 13:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.