git - 获取服务=未找到 git-receive-pack : did you run git update-server-info on the server?

标签 git github git-branch

我试图将本地更改推送到 GitHub 服务器上的分支。以前,当我使用“Git Bash”时,这就像一个魅力。
这次我配置了 Git 提供的 GitHub Windows 应用程序(安装 Git 时桌面上显示的紫色猫图标)来推送我的更改。
以为 GUI 工具会更容易!当我尝试“发布”时,我看到了一条 fatal error 消息。
然后我切换回“Git Bash”,它与我之前对同一个远程分支的提交工作得很好。

我输入了以下命令:

git add .gitignore
git add <<files>> # WORKED
git commit -m <commit desc> # WORKED
git push origin <mybranch> # errored out

我收到以下错误:

fatal: https://github.com/reponame/tree/<mybranch>//info/refs?service=git-receive-pack not found: 
did you run git update-server-info on the server?

在从类似的帖子中发布这篇文章之前,我尝试了不同的方法。

  • 我用 ..Git\bin,\Git\cmd ..Git\libexec\git-core 编辑了 PATH。这没有帮助!
  • 确保 .git/config 有我的分支 URL
  • 尝试从 Eclipse 中“提交并推送”。同样的错误。

安装/配置 Windows GitHub 客户端应用程序是否在我的 PC 上搞砸了我无法再将我的更改推送到远程存储库的东西?

我还应该做些什么来将我的更改推送到 repo 分支?这是在 Windows 上。

最佳答案

我在 git commit 和 push 时遇到了同样的错误。 我在 github 上浏览了我的文件并尝试在那里进行编辑,然后我才知道我没有对该分支的写入权限。 我尝试使用另一个 ID 提交,瞧,它有效。 我认为该错误具有误导性。

关于git - 获取服务=未找到 git-receive-pack : did you run git update-server-info on the server?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37635520/

相关文章:

github - Google 管理控制台与 github 托管网站一起使用

git - GitHub如何强制删除远程分支?

git - 在 bash 脚本中检测当前目录

git 通过终端 merge

linux - svn2git - "hot migration"保留文件权限

git - 将 git rm -f <file> 从另一个分支中删除文件

git - 如何从另一个存储库创建新分支?

git - 是否有 git 分支名称的快捷方式?

python - Pipenv 运行预提交 -- 全部失败,错误为 : An unexpected error has occurred: AttributeError: type object 'Hook' has no attribute 'create

git - 删除远程 fork