简体   繁体   English

Sudo和git命令

[英]Sudo and git commands

I have been trying to resolve permission problems with Terminal. 我一直在尝试解决终端的权限问题。

Git would accept only commands with sudo and entering password, which it makes pushing anything so long. Git将只接受带有sudo的命令并输入密码,这使得推送任何内容都如此之久。

I have tried few advices I found online but none of them helped. 我尝试了一些在网上找到的建议,但都没有帮助。

权限问题

I will be very appreciative if you can help me out. 如果您能帮助我,我将不胜感激。

Thats whats comes up when i insert ls -l. 那就是我插入ls -l时发生的事情。 ls -l outcome ls -l结果

When using sudo chown message is zsh: no such file or directory ls -l image 当使用sudo chown消息是zsh时:没有这样的文件或目录ls -l图像

Try to change permissions to the .git folder. 尝试更改对.git文件夹的权限。

sudo chown <user> /angelweb/.git -R

ps: don't do git init in an existent repository ps:不要在现有存储库中执行git init

First of all your need to define whats wrong, use ls -l to see permissions. 首先,您需要定义错误的地方,使用ls -l查看权限。 If the problem is there use chmod/chown to resolve it. 如果问题仍然存在,请使用chmod / chown来解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM