git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Gforge's cvssh.pl script and git

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 18, 2009, 13:24 UTC
Message-ID
<alpine.DEB.1.00.0902181417510.6274@intel-tinevez-2-302>
In-Reply-To
<2c0671440902180124v50570270gc40b745d4a8b1245@mail.gmail.com>
Hi,
On Wed, 18 Feb 2009, Bosko Ivanisevic wrote:
Show 18 quoted lines
> In the company I'm working someone has restricted access to all users
> to only use cvs via cvssh.pl script (source at the end of message)
> taken from gforge. This script is set as a shell for all users. Now I
> would like to change it so I can run git too. I've tried by adding
> 'git', 'git-upload-pack', 'git-receive-pack' and 'git-shell' in the
> array @allowed_commands. After that if I try to clone existing
> repository with:
> 
> git clone ssh://testuser@server_name/tmp/test.git
> 
> I get following error:
> 
> fatal: ''/tmp/test.git'': unable to chdir or not a git archive
> fatal: The remote end hung up unexpectedly
> 
> I first thought that testuser doesn't have permissions to read
> directory /tmp/test.git so I changed mode and gave r+w permissions
> recursively on that folder, but result was same.
r+w?  Not a+rwx?
And only on /tmp/test.git/, or also on /tmp/?

A better way would be to use 'sudo -u testuser git ls-remote /tmp/test.git' if sudo is available (you haven't revealed useful information about the host).

> There is no way I can avoid this perl script (company policy) but I
> can change it. Problem is that I do not know Perl so much and I do not
> know what git is exactly doing behind the scene when it is run via
> ssh.
I'd use 'system("some shell >&2");' to try to debug it.

Hth, Dscho

Previous: Bosko IvanisevicNext: Bosko Ivanisevic
Message 2 of 4 in “Gforge's cvssh.pl script and git”
  1. Bosko IvanisevicFeb 18, 2009
  2. Johannes SchindelinFeb 18, 2009
  3. Bosko IvanisevicFeb 18, 2009
  4. Johannes SchindelinFeb 18, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.