简体   繁体   中英

When I type git init in Command Prompt, it says “Permission Denied”

I'm trying to upload a fullstack website on heroku app and I was following a tutorial on it. After I logged into Heroku i typed git init to remote connect onto my heroku repository but after typing it, it gave me this error message

C:\Users>git init
C:/Users/.git: Permission denied

I don't know why it does this? can anyone help me?

The Deploying with Git Heroku documentation suggest to use git init inside a local folder representing your project.

cd myapp
git init
Initialized empty Git repository in .git/
git add .
git commit -m "My first commit"

Then:

heroku create
Creating app... done, ⬢ thawing-inlet-61413
https://thawing-inlet-61413.herokuapp.com/ | https://git.heroku.com/thawing-inlet-61413.git

Initializing a Git repository directly in C:\Users instead of a local folder representing your project/application is not correct.
You should use it inside the folder representing your fullstack website.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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