【发布时间】:2022-12-22 07:37:45
【问题描述】:
在过去的几天里,我一直在尝试使用 GitLens 扩展从 VS Code 将一个分支推送到一个私人仓库,结果却失败了,并显示以下神秘消息:
[2022-12-02 21:00:41.637]
Failed to execute git {
"exitCode": 128,
"gitErrorCode": "RemoteConnectionError",
"gitCommand": "push",
"stdout": "",
"stderr": "fatal: 'my-branch' does not appear to be a git repository\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n"
}
我尝试重新安装扩展,并在用户和工作区设置中设置(私有)GitHub Enterprise Server URI。我还将 github-enterprise.uri 设置的值设置为“my.corporate.github.com/Organization”(当然是真实值)。
作为记录:
- VS Code版本:版本:1.73.1(通用)(Mac)
- GitLens 版本:v13.1.1
所以很明显 GitLens 找不到远程仓库的名称。我如何慢跑它的记忆?
【问题讨论】:
-
git remote -v的输出看起来正常吗?如果你运行git push origin my-branch,你会得到同样的错误吗?
标签: git visual-studio-code gitlens