找不到 git-upload-pack
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15323268/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
git-upload-pack not found
提问by Viktor St?rn
I'm trying to clone an existing github-repository (Git for Windows) to an empty folder using
我正在尝试将现有的 github 存储库(Windows 版 Git)克隆到一个空文件夹
git clone https://github.com/di98jgu/D0016E---Digitalt-projekt.git
but keep getting the error message:
但不断收到错误消息:
fatal: https://github.com/di98jgu/D0016E---Digitalt-projekt.git/info/refs?service=git-upload-packnot found: did you run git update-server-info on the server?
致命:https: //github.com/di98jgu/D0016E---Digitalt-projekt.git/info/refs?service=git-upload-pack not found:你在服务器上运行了 git update-server-info 吗?
The server is working fine (others are using it). Have tried adding the paths of git-upload-packand git-receive-packto gitconfig,
服务器工作正常(其他人正在使用它)。已尝试将git-upload-pack和git-receive-pack的路径添加到gitconfig,
[remote "origin"]
url = https://github.com/di98jgu/D0016E--Digital-projekt.git
fetch = +refs/heads/*:refs/remotes/origin/*
uploadpack = libexec/git-core/git-upload-pack
receivepack = libexec/git-core/git-receive-pack
but it didn't help. Seems like a lot of people are having problems causing a similar, but not exactly the same, error message git-upload-pack command not found
, but don't think these solutions apply to my situation.
但它没有帮助。似乎很多人都遇到了导致类似但不完全相同的错误消息的问题git-upload-pack command not found
,但不要认为这些解决方案适用于我的情况。
Anyone know how to solve this?
有谁知道如何解决这个问题?
回答by shanegao
I just come across this issue right now, it is caused by permissions, please make sure that you current account has the permissions of git pull
and git push
,in your case , maybe you create a private repository in Github, and not add this account as Manage Collaborators
, then the issue come.
我现在刚遇到这个问题,是权限问题,请确保你当前的账号有git pull
and的权限git push
,你的情况,可能你在 Github 中创建了一个私有仓库,而不是把这个账号添加为Manage Collaborators
,那么问题来了。
Certainly you also should check if the remote URL is completely correct, include case insensitive, https or http.
当然,您还应该检查远程 URL 是否完全正确,包括不区分大小写、https 或 http。
回答by Chris Kennedy
This happened to me when I renamed my project on Github. In my case I changed the capitalization. The fix is to edit .git/config in your project and make sure the remote URL for github reflects the updated project name.
当我在 Github 上重命名我的项目时,这发生在我身上。就我而言,我更改了大小写。修复方法是在您的项目中编辑 .git/config 并确保 github 的远程 URL 反映更新后的项目名称。
回答by kornfridge
Removing the s
from https
solved my problem.
删除s
fromhttps
解决了我的问题。
回答by droidlabour
In case the repository is private then check if your github userid is allowed to access that repository.
如果存储库是私有的,请检查您的 github 用户 ID 是否被允许访问该存储库。
回答by ttukiainen
If you change the owner of a repository, for example in bitbucket, its url will change -- and trying to push or pull you will start getting this error.
如果您更改存储库的所有者,例如在 bitbucket 中,它的 url 将更改——并且尝试推送或拉取您将开始收到此错误。
In this case you will need to change the remote origin url in the local configuration file $WORKDIR/.git/config
在这种情况下,您需要更改本地配置文件 $WORKDIR/.git/config 中的远程源 url
回答by Kyle Carlson
I had this problem when I mistakenly tried to git clone
a repo that was actually a Mercurial
repo. Someone else created the project and I'd never used Mercurial before.
当我错误地尝试git clone
一个实际上是一个Mercurial
repo的 repo 时,我遇到了这个问题。其他人创建了该项目,而我以前从未使用过 Mercurial。
Felt like an idiot, but I couldn't find any answers on SO that fixed it. Whoops!
感觉像个白痴,但我找不到解决它的任何答案。哎呀!
回答by Ivan Wang
I just got the same error. I use the git update-server-info, but with no luck. I copied the url into browser, it's available. It turns out the git path is case insentive. I checked the github path in the browser, some characters in the parent path is capitalized. Then I tried the exact path as the page tells me, bang! It works like a charm.
我刚刚遇到了同样的错误。我使用 git update-server-info,但没有运气。我将网址复制到浏览器中,它可用。事实证明 git 路径不区分大小写。我在浏览器中查看了github路径,父路径中的一些字符是大写的。然后我尝试了页面告诉我的确切路径,砰!它就像一个魅力。
回答by ForeverWintr
I get this error whenever I try to clone a repository and forget to capitalize the url correctly.
每当我尝试克隆存储库并忘记正确大写 url 时,我都会收到此错误。
If your repository is github.com/myrepos/Repo.git
, you need to check it out with git clone https://github.com/myrepos/Repo.git
using git clone https://github.com/myrepos/repo.git
(with "repo" in lower case) will cause the error you saw.
如果您的存储库是github.com/myrepos/Repo.git
,则需要git clone https://github.com/myrepos/Repo.git
使用 using git clone https://github.com/myrepos/repo.git
(使用小写的“repo”)检查它会导致您看到的错误。
回答by Peter Wood
You have two typos in the URL:
您在 URL 中有两个拼写错误:
https://github.com/di98jgu/D0016E--Digital-projekt.git
Should be:
应该:
https://github.com/di98jgu/D0016E---Digitalt-projekt.git
See the extra hyphen -
and t
before and after Digital
查看额外的连字符-
和t
之前和之后Digital
Thanks for asking the question. I was having trouble cloning gitorious
and kept typing gitorius
, and was getting the same error as you. Some of the answers here made me look more closely at the URL, and check on the website.
感谢您提出问题。我在克隆时遇到了麻烦gitorious
,一直在输入gitorius
,并且遇到与您相同的错误。这里的一些答案让我更仔细地查看 URL,并查看网站。
https://gitorious.org/gitorious/ce-installer.git
回答by Lesly Revenge
this is what you can do to fix this problem.
这是您可以解决此问题的方法。
- log in to github
- create a repository and name it the same name as your project
- push the project again by doing the following:
- 登录github
- 创建一个存储库并将其命名为与您的项目相同的名称
- 通过执行以下操作再次推送项目:
a. 1. git remote remove origin a. 2. git remote add origin https://github.com//sample_app.git b. git push -u origin master c. enter your username d. enter your password
一种。1. git remote 删除原点 2. git remote add origin https://github.com//sample_app.git b. git push -u origin master c. 输入您的用户名 D. 输入您的密码
HOPE IT WORKS FOR YOU
希望这对你有用