git 错误: Unable to find remote helper for 'https'

简介:

今天知道问题的原因了,是因为 /usr/libexec/git-core/ 路径没在 PATH 环境变量中。

我们查看一下:


$ ls /usr/libexec/git-core/
git                    git-http-backend         git-receive-pack
git-add                git-http-fetch           git-reflog
git-add--interactive   git-http-push            git-relink
git-am                 git-imap-send            git-remote
git-annotate           git-index-pack           git-remote-ftp
git-apply              git-init                 git-remote-ftps
git-archive            git-init-db              git-remote-http
git-bisect             git-instaweb             git-remote-https
git-bisect--helper     git-log                  git-repack
git-blame              git-lost-found           git-replace
git-branch             git-ls-files             git-repo-config
git-bundle             git-ls-remote            git-request-pull
git-cat-file           git-ls-tree              git-rerere
git-check-attr         git-mailinfo             git-reset
git-checkout           git-mailsplit            git-revert
git-checkout-index     git-merge                git-rev-list
git-check-ref-format   git-merge-base           git-rev-parse
git-cherry             git-merge-file           git-rm
git-cherry-pick        git-merge-index          git-send-pack
git-clean              git-merge-octopus        git-shell
git-clone              git-merge-one-file       git-shortlog
git-commit             git-merge-ours           git-show
git-commit-tree        git-merge-recursive      git-show-branch
git-config             git-merge-resolve        git-show-index
git-count-objects      git-merge-subtree        git-show-ref
git-describe           git-mergetool            git-sh-setup
git-diff               git-mergetool--lib       git-stage
git-diff-files         git-merge-tree           git-stash
git-diff-index         git-mktag                git-status
git-difftool           git-mktree               git-stripspace
git-difftool--helper   git-mv                   git-submodule
git-diff-tree          git-name-rev             git-symbolic-ref
git-fast-export        git-notes                git-tag
git-fast-import        git-pack-objects         git-tar-tree
git-fetch              git-pack-redundant       git-unpack-file
git-fetch-pack         git-pack-refs            git-unpack-objects
git-filter-branch      git-parse-remote         git-update-index
git-fmt-merge-msg      git-patch-id             git-update-ref
git-for-each-ref       git-peek-remote          git-update-server-info
git-format-patch       git-prune                git-upload-archive
git-fsck               git-prune-packed         git-upload-pack
git-fsck-objects       git-pull                 git-var
git-gc                 git-push                 git-verify-pack
git-get-tar-commit-id  git-quiltimport          git-verify-tag
git-grep               git-read-tree            git-web--browse
git-hash-object        git-rebase               git-whatchanged
git-help               git-rebase--interactive  git-write-tree

这导致里面的 git-remote-https, git-remote-http 这些得不到执行。所以 git 所表现出来的功能不全。

解决办法是:将 /usr/libexec/git-core 纳入 PATH,至少在使用 git 之前,设置一下PATH。


$ PATH=$PATH:/usr/libexec/git-core

或直接在 /etc/profile 中修改。
目录
相关文章
|
9月前
|
缓存 开发工具 git
【git】解决:remote: Permission to xxxx/xxxx.git denied to xxxx
【git】解决:remote: Permission to xxxx/xxxx.git denied to xxxx
361 0
|
8月前
完美解决 fatal: unable to access ‘https://github.com/Homebrew/brew/‘
完美解决 fatal: unable to access ‘https://github.com/Homebrew/brew/‘
310 0
|
2月前
|
网络安全 开发工具 git
git修改提交路径以及强制提交——异常:error: remote origin already exists.与异常:error: failed to push some refs to的解决
git修改提交路径以及强制提交——异常:error: remote origin already exists.与异常:error: failed to push some refs to的解决
20 0
|
5月前
|
网络安全 开发工具 git
git clone之报错git@gitee.com:Permission denied (publickey).fatal: Could not read from remote repository
git clone之报错git@gitee.com:Permission denied (publickey).fatal: Could not read from remote repository
174 0
|
5月前
|
开发工具 git
解决Git push提交时Permission denied(publickey).Could not read from remote...的问题
解决Git push提交时Permission denied(publickey).Could not read from remote...的问题
56 0
|
2月前
|
Linux 开发工具 git
【开发专题_03】unable to access ‘https://github.com/deviantony/docker-elk.git/‘: Failed connect to github
【开发专题_03】unable to access ‘https://github.com/deviantony/docker-elk.git/‘: Failed connect to github
|
2月前
|
开发工具 git
Git:error: remote origin already exists
Git:error: remote origin already exists
21 2
|
9月前
|
存储 开发工具 git
使用 git push 上传超过100MB文件报错 remote: error: this exceeds GitHub‘s file size limit of 100.00 MB
Git 大文件存储(LFS)用 Git 中的文本指针替换音频示例、视频、数据集和图形等大文件,同时将文件内容存储在 GitHub.com 或 GitHub Enterprise 等远程服务器上。
170 0
|
4月前
【Error】fatal: unable to access ‘https://github.com/PanJiaChen/vue-element-admin/‘: OpenSSL SSL_read:
【Error】fatal: unable to access ‘https://github.com/PanJiaChen/vue-element-admin/‘: OpenSSL SSL_read:
|
5月前
|
开发工具 git
git查看远程仓库(git remote)
git查看远程仓库(git remote)