Home > Back-end >  Git Error message Permission denied for init
Git Error message Permission denied for init

Time:05-16

I am a beginner working on a windows computer, trying to push my project on git. When I try to run git init I get my permission denied. Link to my screen shot

It just says C:/Program Files/Git/.git: Permission denied . That is what happens when I use the git window.

When I use Command Prompt, I get as far as git add -A then it starts spamming the screen with

warning: could not open directory 'AppData/Local/Application Data/': Permission denied
warning: could not open directory 'AppData/Local/History/': Permission denied
warning: could not open directory 'AppData/Local/Microsoft/Windows/INetCache/Content.IE5/': Permission denied
warning: could not open directory 'AppData/Local/Microsoft/Windows/Temporary Internet Files/': Permission denied
warning: could not open directory 'AppData/Local/Temporary Internet Files/': Permission denied
warning: could not open directory 'Application Data/': Permission denied
warning: could not open directory 'Cookies/': Permission denied
warning: could not open directory 'Documents/My Music/': Permission denied
warning: could not open directory 'Documents/My Pictures/': Permission denied
warning: could not open directory 'Documents/My Videos/': Permission denied
warning: could not open directory 'Local Settings/': Permission denied
warning: could not open directory 'My Documents/': Permission denied
warning: could not open directory 'NetHood/': Permission denied
warning: could not open directory 'PrintHood/': Permission denied
warning: could not open directory 'Recent/': Permission denied
warning: could not open directory 'SendTo/': Permission denied
warning: could not open directory 'Start Menu/': Permission denied
warning: could not open directory 'Templates/': Permission denied
warning: LF will be replaced by CRLF in .AndroidStudio3.4/config/codestyles/Default.xml.
The file will have its original line endings in your working directory

then keeps on repeating the last two lines with variations. Even as I type this, it is still spamming. What should I do?

CodePudding user response:

Run the console in administrator mode and try git git add . instead

CodePudding user response:

use the following command.

runas git add.
  • Related