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