错误:无法锁定配置文件。git/ config:没有此类文件或目录

问题描述 投票:1回答:1

显示以下错误:

heroku git:remote -intensive-journey-57915错误:命令失败:git remote add herokuhttps://git.heroku.com/intense-journey-57915.git错误:无法锁定配置文件.git / config:没有此类文件或目录致命:无法将“ remote.heroku.url”设置为“ https://git.heroku.com/intense-journey-57915.git

实际上这确实存在。系统变量HOME设置正确。使用VS Code工作(以管理员身份)。 Windows 10. Git版本2.23.0知道如何解决吗?

git heroku visual-studio-code
1个回答
0
投票

实际上这确实存在。

请确保您位于正确的文件夹中,即位于本地Git存储库中。键入简单的git config -l,例如:since Git 2.8 (March 2018), it will say if it is executed outside a Git repository

第二项测试是:

  • 关闭所有程序
  • 在命令行中重试git remote命令

    git remote add heroku 'https://git.heroku.com/intense-journey-57915.git
    

希望所有可能保留了.git/config文件句柄的程序都已关闭并释放了该句柄,使git remote命令成功完成。

© www.soinside.com 2019 - 2024. All rights reserved.