MacBook-Pro% git push
Counting objects: 124, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (102/102), done.
Writing objects: 100% (124/124), 2.41 MiB | 6.50 MiB/s, done.
Total 124 (delta 14), reused 0 (delta 0)
remote: error: cannot lock ref 'refs/heads/master': Unable to create '/home/git/pdog.git/refs/heads/master.lock': Permission denied
To 119.28---:/home/git/pdog.git
! [remote rejected] master -> master (failed to update ref)
error: failed to push some refs to 'git@119.28---:/home/git/pdog.git'
複製程式碼
進到遠端主機修改資料夾許可權解決。
同其他許可權問題。
.ssh
許可權設定為 700 ,authorized_keys
許可權設定為600
修改選擇chmod 600 filename
,
檢視許可權 ls -la filename