Obviously this is a permissions issue, but ubuntu usually comes with git, so it shouldn’t be the reason @notreami said. Here I need to confirm something:
Are you sure that when you use git in any folder, you will get a prompt about insufficient permissions?
It is recommended to try a more common folder. If your answer is no, it is likely that you do not have enough permissions on the current folder, that is, you do not have write permissions.
Of course, you can also use ls -l to view the permission information of the folder.
In addition, I tried it on my ubuntu system. I don’t have write permissions on the /opt directory, so I speculate that your html directory was created using sudo mkdir, so it’s not surprising that you have a problem like this.
Obviously this is a permissions issue, but ubuntu usually comes with git, so it shouldn’t be the reason @notreami said. Here I need to confirm something:
Are you sure that when you use git in any folder, you will get a prompt about insufficient permissions?
It is recommended to try a more common folder. If your answer is no, it is likely that you do not have enough permissions on the current folder, that is, you do not have write permissions.
Of course, you can also use
ls -l
to view the permission information of the folder.In addition, I tried it on my ubuntu system. I don’t have write permissions on the /opt directory, so I speculate that your html directory was created using
sudo mkdir
, so it’s not surprising that you have a problem like this.Is git installed under root permission? Uninstall git, and then install git under your user rights.
Clone repo under root permission
yu install mei guan xi