我无法克隆 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 二进制文件 (./configure --prefix=/usr --with-curl=/ usr/bin/curl)
./configure --prefix=/usr --with-curl --with-expat
还尝试将配置指向 curl 二进制文件(./configure --prefix=/usr --with-curl=/usr/bin/curl)
我已经尝试了我在互联网上可以找到的所有东西,但没有运气。谁能帮我?
Git 版本 = 1.7.6.4
操作系统 = Ubuntu 11.04
curl --help
,看看是不是。
看起来在编译 git 时没有安装 (lib)curl-devel 可能会导致这种情况。
如果你安装(lib)curl-devel,然后重建/安装 git,这应该可以解决问题:
$ yum install curl-devel
$ # cd to wherever the source for git is
$ cd /usr/local/src/git-1.7.9
$ ./configure
$ make
$ make install
这在 Centos 6.3 上对我有用。
如果你没有 yum,你可以在这里下载 curl-devel 的源代码:
http://curl.se/dlwiz/?type=devel
如果您正在运行 Ubuntu:
sudo apt-get install libcurl4-openssl-dev
如果您正在尝试克隆,那么您可以使用 git 传输
例如:git clone git://github.com/fog/fog.git
Vaio ~/Myworks/Hero $ git clone git://github.com/fog/fog.git
Initialized empty Git repository in /home/nthillaiarasu/Myworks/Hero/fog/.git/
remote: Counting objects: 41138, done.
remote: Compressing objects: 100% (13176/13176), done.
remote: Total 41138 (delta 27218), reused 40493 (delta 26708)
Receiving objects: 100% (41138/41138), 5.22 MiB | 58 KiB/s, done.
Resolving deltas: 100% (27218/27218), done
git config --global url."git://".insteadof https://
强制 git
始终使用 git :// 而不是 https://。如果您尝试使用子模块(例如使用 --recursive
)进行克隆,这将很有用。
git clone git://github.com/something
,导致“远程错误”:“不再支持端口9418上未经身份验证的git协议。”
万一有人在 QNAP 系统或任何其他使用 OPKG 作为包管理器的系统上遇到此问题:
您需要与 git 一起安装 git-http。喜欢:
opkg install git-http
git
;在 Beta 版期间已经删除了很多内容,因此我正在安装我在 OPKG/Entware 中缺少的内容...因此我现在使用的 git
版本是来自那里的版本...缺少 HTTP支持。呸!那好吧。感谢您指出这一点,我永远不会自己弄清楚...... OPKG经理应该发出警告!
我使用“git://
”而不是“https://
”,这解决了问题。我的最终命令是:
git clone --recursive git://github.com/ceph/ceph.git
在我们的案例中,当我们检查时问题已解决
git --exec-path
指向一条不再存在的路径。 (它指向我们编译 git 的路径,而不是我们之后复制的路径以供任何人访问)
我们做了一个:
export GIT_EXEC_PATH=<path_of_/libexec/git-core/>
并解决了。
在 CentOS 5.x 上,安装 curl-devel 为我解决了这个问题。
yum install curl-devel
,然后是 ./configure
、make
和 make install
。然后 https:// 为我工作。这是在 CentOS 5.8 上
我有同样的问题,解决起来很简单。
只需卸载 git 并重新安装即可。
#apt-get remove --purge git-svn git-core
#rm /usr/local/bin/git
#apt-get install git-svn git-core
一切正常。
希望这有帮助。
我遇到了完全相同的问题,它归结为未满足的依赖关系,但是,我尝试了接受的答案的解决方案,但它不起作用。
最终对我有用的是安装以下所有内容(这是 RedHat):
sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
之后,我按照指定运行了其他命令并且它起作用了:
./configure
make
sudo make prefix=/usr/local install
我直接从 Git's website 中提取了依赖项列表。显然我应该从那里开始:/
解决此问题的最简单方法是确保将 git-core
添加到当前用户的 path
如果您将以下内容添加到 ~/.bash_profile
中的 bash 配置文件中,这通常应该可以解决问题
PATH=$PATH:/usr/libexec/git-core
这对我在 Centos 6.6 中安装 git 2.3.1 有用:
我没有安装 curl-devel(检查 -lcurl 中的 curl_global_init ... 否)。关键是为 docboox2x 安装包生成配置脚本 add rpmforge yum install openssl-devel zlib-devel perl-ExtUtils-MakeMaker svn tcl perl-Locale-Msgfmt gettext asciidoc xmlto docbook2x make symlink ln -s /usr/bin/db2x_docbook2texi /usr /bin/docbook2x-texi build git # 从 https://github.com/git/git/releases 下载最新版本 curl -O -J -L https://github.com/git/git/archive/v2.13.0 .tar.gz tar xf git-2.13.0.tar.gz cd git-2.13.0 make configure ./configure --prefix=/usr make all doc make install install-doc install-html
在 Mac OS X 10.9 Mavericks 上,有效的解决方案如下
rvm pkg install openssl
CC=/usr/local/bin/gcc-4.2 CPP=/usr/local/bin/cpp-4.2 CXX=/usr/local/bin/g++-4.2 rvm install 1.9.3 --with-openssl-dir=$rvm_path/usr
这是使用 OpenSSL 支持编译 Ruby。接下来,卸载所有旧版本。
brew uninstall openssl
brew uninstall curl
brew uninstall git
接下来,安装更新的版本。 git 安装依赖于 CURL 的更新版本。
brew install openssl
brew install curl
brew install git
CC=/usr/local/bin/gcc-4.2 CPP=/usr/local/bin/cpp-4.2 CXX=/usr/local/bin/g++-4.2
使用了更高的 ruby 版本
conda install git
来安装更新的 git 版本和依赖包。
如果在通过 github 命令行实用程序绑定使用 github 时出现此问题,则问题可能是由于使用了 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
我在使用 capistrano 部署 rails 应用程序时遇到了这个问题。问题是我的用户在 cpanel 中只有一个被监禁的 shell 访问权限。将其更改为正常的 shell 访问解决了我的问题。
[git]
下的 jk_init.ini
中添加什么来解决此问题?
windows系统下使用带有Jenkins的git,需要在Manage Jenkins =>下配置git.exe的位置。 全局工具配置 => Git => Git可执行文件的路径,并填写git.exe的路径,例如; C:\Program Files\Git\bin\git.exe
我在这个远程助手问题上遇到了很多问题。我确保我已经安装了所有的 expat、curl 等,但最终在发现 4.4.4 版本是 duff 后通过更新 gcc 来解决它。刚刚做了一个 yum 更新并用 4.4.6 重新编译。
在centos 7上:
$ yum install curl-devel
$ yum reinstall git
这对我行得通。
我今天遇到了同样的问题:经过多年的愉快服务,git http 坏了。这似乎是由一些 Perl lib 更新引起的。在网上尝试了一些理智的建议,没有一个奏效。受够了,我刚刚删除了所有 git 内容,从 http://git-scm.com/ 获取了一个新的 tarball,编译并安装,一切都恢复正常了。试试看,或者你可以深入挖掘你的日志......
我不得不添加几个运行 CentOS 5.10 版(最终版)的额外安装:
yum install openssl097a.x86_64
yum install openssl-perl.x86_64
使用 git-1.8.5:./configure make clean make make install
git clone https://github.com/michaelficarra/CoffeeScriptRedux.git
Cloning into 'CoffeeScriptRedux'...
remote: Reusing existing pack: 4577, done.
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 4601 (delta 13), reused 11 (delta 1)
Receiving objects: 100% (4601/4601), 2.60 MiB | 126.00 KiB/s, done.
Resolving deltas: 100% (2654/2654), done.
Checking connectivity... done.
我曾经在这里登陆,因为我正在使用 git 本身。当我构建它时,默认的 makefile 将二进制文件安装在 ~/bin/git 中。因为当我运行 'git pull --rebase' 时,我的 PATH 首先有 ~/bin,所以它使用了 ~/bin 中的那个,因此无法找到帮助程序。
我通过使用完整路径运行“/usr/bin/git ...”解决了这个问题(或者我可以调整我的路径)。
工作过
1-我不得不删除 git:
sudo apt-get remove git
2-重新安装带有-all后缀的git:
sudo apt-get install git-all
如此处所教:https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
3-检查我的 github 帐户的所有设置(用户名和电子邮件)
顺便说一句,我误认为是我的错误来源的好电子邮件 ;) https://github.com/settings/profile
检查您的用户名
https://github.com/settings/emails
检查您的电子邮件是否是好的
4-我在这里遵循了git的教程
https://help.github.com/articles/connecting-to-github-with-ssh
在我的情况下,没有任何事情是成功的,过了一会儿我在我的配置文件中发现了发生了什么。不知道它是如何到达那里的
% cat ~/.gitconfig
[user]
email = xxxxxxx@gmail.com
name = xxxxxx
[alias]
g = grep -n -i --heading --break
[url "git+https://github.com/"]
insteadOf = git@github.com:
[url "git+https://"]
insteadOf = git://
删除 url 属性后一切正常
CentOS Minimal 通常通过yum install git
命令安装 1.8 版 git。
最好的方法是构建 &从源代码安装它。当前版本是 2.18.0
。
从 https://mirrors.edge.kernel.org/pub/software/scm/git/ 或 curl -o git-2.18.0.tar.gz https://mirrors.edge.kernel.org/ 下载源代码pub/software/scm/git/git-2.18.0.tar.gz 解压 tar -zxf git-2.18.0.tar.gz && cd git-2.18.0 执行yum install autoconf curl-devel安装依赖包expat-devel gettext-devel openssl-devel perl-devel zlib-devel asciidoc xmlto openjade perl* texinfo 安装 docbook2X,它不在 rpm 存储库中。通过 $ curl -o docbook2X-0.8.8-17.el7.x86_64.rpm http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/d/docbook2X-0.8.8-17 下载并安装.el7.x86_64.rpm $ rpm -Uvh docbook2X-0.8.8-17.el7.x86_64.rpm
并创建一个 unix 链接名称:
ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi
编译安装,参考https://git-scm.com/book/en/v2/Getting-Started-Installing-Git $ make configure $ ./configure --prefix=/usr $ make all doc info $ sudo make install install-doc install-html install-info 重启你的服务器(如果没有,你可能会遇到 Unable to find remote helper for 'https' 错误) $ reboot now Test: $ git clone https://github.com/volnet/v -labs.git $ cd v-labs $ touch test.txt $ git add . $ git commit -m "test git install" $ git push -u
我在使用 TortoiseGit 时在 Windows 上遇到了这个错误。重新安装适用于 Windows 的 Git 并通过重新运行首次启动向导来告诉 TortoiseGit git.exe 的路径已修复它。
在我的情况下,git --exec-path
指向正确的路径,并且 git-remote-https
存在但没有执行权限。所以 chmod +x git-remote-http
解决了这个问题。
在 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
不定期副业成功案例分享
sudo apt-get install libcurl4-openssl-dev
sudo aptitude install libcurl4-openssl-dev
apt-get 有依赖问题,aptitude 似乎可以解决它