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.
Quoted from here
今天我就碰上了这个错误。gitosis的错误提示实在是太简单了。只能上Google来看有没有前人遇到过这类的问题了。结果运气还不错,直接就找到了根源。如这位大哥所说的,remote中的url最后不要以/结尾就好了。