在windows下搭了个服务器学习git。push时出现如下异常:
“git clone git@127.0.0.1:/home/git/repositories/gitosis-admin.git”
git.exe push --force --progress "origin" master:master
Counting objects: 189, done.
Compressing objects: 100% (187/187)
Writing objects: 7% (14/189)
fatal: Unable to create temporary file: Permission denied
fatal: sha1 file '<stdout>' write error: Invalid argument
error: failed to push some refs to 'git@10.73.4.46:channelv.git'
git did not exit cleanly (exit code 1)
原因是因为创建用来登陆ssh的用户git,没有修改版本库的权限。即给gitosis-admin.git文件夹,加上git用户的修改权限即可。("chown -R git *")