当我在命令提示符下键入git init时,它说"Permission Denied". [英] When I type git init in Command Prompt, it says "Permission Denied"
问题描述
我正在尝试在heroku应用程序上上传完整的网站,并且正在关注其中的教程.登录Heroku后,我输入git init远程连接到我的heroku存储库,但是输入后,它给了我这个错误消息
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?
推荐答案
使用Git进行部署 Heroku文档建议在代表您的项目的本地文件夹内使用 git init
.
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"
然后:
heroku create
Creating app... done, ⬢ thawing-inlet-61413
https://thawing-inlet-61413.herokuapp.com/ | https://git.heroku.com/thawing-inlet-61413.git
直接在 C:\ Users
中而不是在代表您的项目/应用程序的本地文件夹中初始化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.
这篇关于当我在命令提示符下键入git init时,它说"Permission Denied".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!