在 VPS 上,我可以使用登录
ssh admin@server.com
我在以下位置创建了一个裸存储库:
/var/repo/site.git
其中有:
drwxr-xr-x 7 root root 119 Jan 31 13:35 site.git
我在本地设置:
git 远程添加生产 ssh://admin@server.com/../../var/repo/site.git
但是当我尝试 tyo push 我得到这个错误:
PS D:\path\site-directory> git push production master
admin@server.com's password:
Enumerating objects: 1152, done.
Counting objects: 100% (1152/1152), done.
Delta compression using up to 8 threads
Compressing objects: 100% (1073/1073), done.
remote: fatal: Unable to create temporary file '/var/repo/site.git/./objects/pack/tmp_pack_XXXXXX': Permission denied
fatal: sha1 file '<stdout>' write error: Broken pipe
error: remote unpack failed: index-pack abnormal exit
To ssh://server.com/../../var/repo/site.git
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to 'ssh://server.com/../../var/repo/site.git'
我认为我必须调整一些权限,否则我可能设置了错误的路径。
谁能帮我弄清楚如何排除故障?