我无法克隆HTTPS存储库。我可以克隆SSH回购很好,但不是HTTPS回购。我无法测试GIT协议,因为我位于公司防火墙后面。

这就是我要做的:

$ git clone https://github.com/nvie/gitflow.git
Cloning into gitflow...
fatal: Unable to find remote helper for 'https'

到目前为止,我尝试了以下(基于谷歌搜索)

通过apt-get清洗和安装Git 通过apt-get为Git安装build-deps 安装curl开发库 安装外派库 下载Git源代码并使用以下方法构建: ./configure——prefix=/usr——with-curl——with-expat 还尝试在curl binary(。——prefix=/usr——with-curl=/usr/bin/curl)

我已经试遍了我在网上能找到的所有东西,但都没有成功。有人能帮帮我吗?

转到版本 = 1.7.6.4

操作系统 = Ubuntu 11.04


当前回答

这是2020年发现的 解决方案解决了OMZ的问题 https://stackoverflow.com/a/13018777/13222154

...
➜  ~ cd $ZSH
➜  .oh-my-zsh (master) ✗ git remote -v
origin  https://github.com/ohmyzsh/ohmyzsh.git (fetch)
origin  https://github.com/ohmyzsh/ohmyzsh.git (push)
➜  .oh-my-zsh (master) ✗ date ; omz update
Wed Sep 30 16:16:31 CDT 2020
Updating Oh My Zsh
fatal: Unable to find remote helper for 'https'
There was an error updating. Try again later?
omz::update: restarting the zsh session...

...

    ln "$execdir/git-remote-http" "$execdir/$p" 2>/dev/null || \
    ln -s "git-remote-http" "$execdir/$p" 2>/dev/null || \
    cp "$execdir/git-remote-http" "$execdir/$p" || exit; \
done && \
./check_bindir "z$bindir" "z$execdir" "$bindir/git-add"
➜  git-2.9.5 
➜  git-2.9.5 
➜  git-2.9.5 
➜  git-2.9.5 omz update       
Updating Oh My Zsh
remote: Enumerating objects: 296, done.
remote: Counting objects: 100% (296/296), done.
remote: Compressing objects: 100% (115/115), done.
remote: Total 221 (delta 146), reused 179 (delta 105), pack-reused 0
Receiving objects: 100% (221/221), 42.89 KiB | 0 bytes/s, done.
Resolving deltas: 100% (146/146), completed with 52 local objects.
From https://github.com/ohmyzsh/ohmyzsh
 * branch            master     -> FETCH_HEAD
   7deda85..f776af2  master     -> origin/master
Created autostash: 273f6e9

其他回答

我使用“git://”而不是“https://”,这就解决了问题。我最后的命令是:

git clone --recursive git://github.com/ceph/ceph.git

如果这个问题是在通过github命令行实用程序绑定到github时发生的,那么这个问题很可能是由于使用了gh的snap版本。

如果你可以用git clone克隆而没有得到这个错误,那么问题是gh的snap版本。

最后,github文档挽救了这一天! https://github.com/cli/cli/blob/trunk/docs/install_linux.md

以下是节省时间的步骤(debian/ubuntu/Raspberry PiOS):

curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh

我有完全相同的问题,它归结为一个未满足的依赖,然而,我尝试了公认的答案的解决方案,它没有工作。

最后对我有用的是安装以下所有软件(这是RedHat):

sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel

之后,我运行了其他命令,它工作:

./configure
make
sudo make prefix=/usr/local install

我直接从Git的网站上获取了依赖项列表。显然我应该从这里开始:/

这是2020年发现的 解决方案解决了OMZ的问题 https://stackoverflow.com/a/13018777/13222154

...
➜  ~ cd $ZSH
➜  .oh-my-zsh (master) ✗ git remote -v
origin  https://github.com/ohmyzsh/ohmyzsh.git (fetch)
origin  https://github.com/ohmyzsh/ohmyzsh.git (push)
➜  .oh-my-zsh (master) ✗ date ; omz update
Wed Sep 30 16:16:31 CDT 2020
Updating Oh My Zsh
fatal: Unable to find remote helper for 'https'
There was an error updating. Try again later?
omz::update: restarting the zsh session...

...

    ln "$execdir/git-remote-http" "$execdir/$p" 2>/dev/null || \
    ln -s "git-remote-http" "$execdir/$p" 2>/dev/null || \
    cp "$execdir/git-remote-http" "$execdir/$p" || exit; \
done && \
./check_bindir "z$bindir" "z$execdir" "$bindir/git-add"
➜  git-2.9.5 
➜  git-2.9.5 
➜  git-2.9.5 
➜  git-2.9.5 omz update       
Updating Oh My Zsh
remote: Enumerating objects: 296, done.
remote: Counting objects: 100% (296/296), done.
remote: Compressing objects: 100% (115/115), done.
remote: Total 221 (delta 146), reused 179 (delta 105), pack-reused 0
Receiving objects: 100% (221/221), 42.89 KiB | 0 bytes/s, done.
Resolving deltas: 100% (146/146), completed with 52 local objects.
From https://github.com/ohmyzsh/ohmyzsh
 * branch            master     -> FETCH_HEAD
   7deda85..f776af2  master     -> origin/master
Created autostash: 273f6e9

对于那些在windows系统下使用Jenkins的git,你需要在下面配置git.exe的位置: 例如,Manage Jenkins => Global Tool Configuration => Git => Git可执行文件的路径,并填写Git .exe的路径;C:\Program Files\Git\bin\git.exe