首页 > 解决方案 > 无法通过命令行将我的 Web 应用程序推送到 GitHub 存储库

问题描述

我正在尝试将我的 Web 应用程序推送到我的 GitHub 存储库,并且我想在根级别初始化 Git 存储库,但我收到了这个错误

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

也在尝试命令时: git commit -m "first commit"

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'user@DESKTOP-SBN1VHI.(none)')

我确认我的 GitHub 存储库链接是正确的。你知道具体是什么问题吗?

标签: gitgithub

解决方案


“权限被拒绝”消息与访问远程存储库无关,它指的是.git本地磁盘上的目录。确保您正在运行的用户git对此目录具有写入权限。


推荐阅读