JP van Oosten

Gitosis: arguments to command look dangerous

Nov 12, 2009

If you get the following error when trying to execute git pull: “Arguments to command look dangerous”, then you might want to check whether the remote repository ends with a slash (/). This tripped me and a friend over the other day. Since gitosis is not very verbose with its error-messages, I had to dig deep to find this out.

In general, the path to the git repository needs to start with an alphanumeric character followed by zero or more alphanumeric characters, @, _ or -. Subdirectories have the same restrictions. So, paths cannot end in a slash.

Just edit the corresponding remote section (usually this is origin and the section looks like [remote "origin"]) in the file .git/config and correct the path after the colon (:), for example by removing the slash at the end.