尝试 git pull 时出现错误:无法打开 .git/FETCH_HEAD:权限被拒绝 [英] Trying to git pull with error: cannot open .git/FETCH_HEAD: Permission denied
本文介绍了尝试 git pull 时出现错误:无法打开 .git/FETCH_HEAD:权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请帮帮我,我正在尝试在我的终端中运行它:
Help me please, I am trying to run this in my terminal:
asgard@asgard-A7N8X2-0:~/CollegePortal$ git pull
error: cannot open .git/FETCH_HEAD: Permission denied
那我试试这个
asgard@asgard-A7N8X2-0:~/CollegePortal$ sudo git pull
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
帮帮我,我不明白这个问题.
Help me, I don't understand this problem.
推荐答案
检查您是否对 .git/
目录有足够的权限.你应该有写权限.您可以使用以下命令设置它们.
Check if you have enough permissions on the .git/
directory. You should have write permissions. You can set them with the following command.
转到您的项目文件夹:
chown -R youruser:yourgroup .git/
这篇关于尝试 git pull 时出现错误:无法打开 .git/FETCH_HEAD:权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文