threads / discuss / 19662

Can I set up a GIT server w/o administration privileges on a Solaris machine?

Subject: Can I set up a GIT server w/o administration privileges on a Solaris machine?

## tl;dr

4 messages between Jun 4, 2009 and Jun 5, 2009.

replies: 3people: 3as markdown or json

stuart· Jun 4, 2009, 16:35 UTC · lore
Hi...

Can I set up a GIT server w/o administration privileges on a Solaris machine?

I think this should be a simple question to answer.  I have looked in 
the archives - but most, if not all, who post are setting up GIT servers 
  using administration privileges.  I have a shell account on a Solaris 
box where I can create web pages and trigger the execution of scripts 
from those pages...but no administration right.  So, I started down the 
path of privately installing software.  However, it became apparent that 
I need git listing on this port and running that daemon...both of which 
are almost impossible with out administration rights.

So, is there a way to get some basic GIT functionality through serving up web pages and executing CGI scripts. Is there somewhere I can read up on this type of server installation?

-thank you
Tomas Carnecky· Jun 4, 2009, 17:34 UTC · re: stuart · lore

Re: Can I set up a GIT server w/o administration privileges on a Solaris machine?

On Jun 4, 2009, at 6:35 PM, stuart wrote:
Show 14 quoted lines
> Hi...
>
> Can I set up a GIT server w/o administration privileges on a Solaris  
> machine?
>
> I think this should be a simple question to answer.  I have looked  
> in the archives - but most, if not all, who post are setting up GIT  
> servers  using administration privileges.  I have a shell account on  
> a Solaris box where I can create web pages and trigger the execution  
> of scripts from those pages...but no administration right.  So, I  
> started down the path of privately installing software.  However, it  
> became apparent that I need git listing on this port and running  
> that daemon...both of which are almost impossible with out  
> administration rights.

The default port of the git daemon is 9418. Unix systems usually don't require admin privileges to bind to port >1024. Maybe there's a firewall between you and the solaris box preventing you from connecting to such non-standard port? If you are sure there is no such thing, then simply fire up git-daemon and try to connect to it:

(assuming /path/to/repo.git is the git repository on the server) server$ git-daemon --export-all --verbose --base-path=/path/to/ /path/ to/ client$ git ls-remote git://<server>/repo.git

If the connection was successful, then stop git-daemon, add '--detach' to its command line and start it again. It will put itself into the background, so you can log off the server and git-daemon will keep runnig. One downside is that it will not be automatically restarted when it crashes, or when the server is restarted.

> So, is there a way to get some basic GIT functionality through  
> serving up web pages and executing CGI scripts.  Is there somewhere  
> I can read up on this type of server installation?

Git can be used over dumb http protocol. Fetching through http is fairly easy, simply put the git repo into a directory where the web server has read rights. Pushing through http will likely require you to edit the http server settings. Also, git:// protocol is almost always preferable over http://.

tom
Tomas Carnecky· Jun 4, 2009, 17:37 UTC · re: Tomas Carnecky · lore

Re: Can I set up a GIT server w/o administration privileges on a Solaris machine?

On Jun 4, 2009, at 7:34 PM, Tomas Carnecky wrote:
Show 42 quoted lines
>
> On Jun 4, 2009, at 6:35 PM, stuart wrote:
>
>> Hi...
>>
>> Can I set up a GIT server w/o administration privileges on a  
>> Solaris machine?
>>
>> I think this should be a simple question to answer.  I have looked  
>> in the archives - but most, if not all, who post are setting up GIT  
>> servers  using administration privileges.  I have a shell account  
>> on a Solaris box where I can create web pages and trigger the  
>> execution of scripts from those pages...but no administration  
>> right.  So, I started down the path of privately installing  
>> software.  However, it became apparent that I need git listing on  
>> this port and running that daemon...both of which are almost  
>> impossible with out administration rights.
>
> The default port of the git daemon is 9418. Unix systems usually  
> don't require admin privileges to bind to port >1024. Maybe there's  
> a firewall between you and the solaris box preventing you from  
> connecting to such non-standard port? If you are sure there is no  
> such thing, then simply fire up git-daemon and try to connect to it:
>
> (assuming /path/to/repo.git is the git repository on the server)
> server$ git-daemon --export-all --verbose --base-path=/path/to/ / 
> path/to/
> client$ git ls-remote git://<server>/repo.git
>
> If the connection was successful, then stop git-daemon, add '-- 
> detach' to its command line and start it again. It will put itself  
> into the background, so you can log off the server and git-daemon  
> will keep runnig. One downside is that it will not be automatically  
> restarted when it crashes, or when the server is restarted.
>
>> So, is there a way to get some basic GIT functionality through  
>> serving up web pages and executing CGI scripts.  Is there somewhere  
>> I can read up on this type of server installation?
>
> Git can be used over dumb http protocol. Fetching through http is  
> fairly easy, simply put the git repo into a directory where the web  
> server has read rights. Pushing
... and run git-update-server-info in the git repository.
Show 6 quoted lines
> through http will likely require you to edit the http server  
> settings. Also, git:// protocol is almost always preferable over  
> http://.
>
> tom
>
Jakub Narebski· Jun 5, 2009, 08:42 UTC · re: Tomas Carnecky · lore

Re: Can I set up a GIT server w/o administration privileges on a Solaris machine?

Tomas Carnecky <tom@dbservice.com> writes:
Show 11 quoted lines
> The default port of the git daemon is 9418. Unix systems usually don't
> require admin privileges to bind to port >1024. Maybe there's a
> firewall between you and the solaris box preventing you from
> connecting to such non-standard port? If you are sure there is no such
> thing, then simply fire up git-daemon and try to connect to it:
> 
> (assuming /path/to/repo.git is the git repository on the server)
>
> server$ git-daemon --export-all --verbose \
>   --base-path=/path/to/ /path/to/
> client$ git ls-remote git://<server>/repo.git

Use dashless form "git daemon" and not "git-daemon", otherwise it cannot be found with modern git installation.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

← back to recent threads