I downloaded someone else's already ready repository. Add a folder

enter image description here

I run git status it is still red enter image description here

  • So Permission denied ... You, probably, did git clone from under root ? - vp_arth
  • I mean sudo? No, I just typed - sinevik

2 answers 2

git add ./src

you have instead. worth:

  • All the same, the same thing - sinevik

You for some reason do not have access to the service files of the repository ..

You can fix permissions to the repository / settings files as follows:

 sudo chown -R $USER .git sudo chown -R $USER ~/.config/git 

Instead of the $ USER variable, you can write your username: ivansinevich

  • And how do you get rid of this sudo? - sinevik
  • In the sense of getting rid of? Why don't you have permission to access the ~/.config/git/attributes file? - vp_arth
  • I was told that if you use sudo, then you get sick of problems. I don’t understand what it means, what sudo, what is there - sinevik
  • Here, instead of $ User, I need to enter my own, do I understand correctly? - sinevik
  • ivansinevich $ sudo chown -R $ ivansinevich .git - sinevik