Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法使用Eclipse/Egit通过SSH将git接收包和git上载包推送到存储库_Eclipse_Git_Egit_Git Push - Fatal编程技术网

无法使用Eclipse/Egit通过SSH将git接收包和git上载包推送到存储库

无法使用Eclipse/Egit通过SSH将git接收包和git上载包推送到存储库,eclipse,git,egit,git-push,Eclipse,Git,Egit,Git Push,标题几乎说明了这一切: 我正在使用Eclipse(Juno SR2)和EGit插件(2.2.0) 我使用SSH设置了一个远程存储库,由于gitd未在远程上设置,并且由于git工具不在路径上,我在配置文件中有以下设置: [remote "origin"] url = ssh://moi@fully.qualified.host/home/colleague/repo.git fetch = +refs/heads/*:refs/remotes/origin/* upload

标题几乎说明了这一切:

我正在使用Eclipse(Juno SR2)和EGit插件(2.2.0)

我使用SSH设置了一个远程存储库,由于gitd未在远程上设置,并且由于git工具不在路径上,我在配置文件中有以下设置:

[remote "origin"]
    url = ssh://moi@fully.qualified.host/home/colleague/repo.git
    fetch = +refs/heads/*:refs/remotes/origin/*
    uploadpack = ~colleague/bin/git-upload-pack
    receivepack = ~colleague/bin/git-receive-pack
从命令行执行一次普通的
git推送
,会显示服务器的安全警告,然后提示我输入ssh密码,然后完美地推送

但是在Eclipse中,我会弹出一个带有服务器警告的弹出窗口,然后系统会像以前一样提示我输入密码,一切正常,然后最后确认推送的提交列表是空的,并且在列表顶部有一个错误

ssh://moi@fully.qualified.host/home/colleague/repo.git: push not permitted
我在一个新的分支中,这个分支还没有被推到远程,如果这有什么不同的话


以前有人看到过吗?

对于跟在我后面的人来说

我找到了一个解决办法。您无法在存储库配置中设置接收和上载包的位置,因此必须从您的配置中删除:

[remote "origin"]
    receivepack = /blah/bin/git-receive-pack
    uploadpack = /blah/bin/git-upload-pack
我正在远程使用Bash shell,在
.bashrc
的开始,当shell处于非交互状态时,在退出之前,位置会添加到路径中,如下所示:

# If not running interactively, most of what follows is not worth doing
if [ -z "$PS1" ] ; then
  # Make sure my extra stuff is on the path even in non-intaractive shells (I'm looking at you SSH!)
  export PATH=/blah/bin:$PATH
  return
fi

我现在可以从本地命令行或通过Eclipse/EGit进行推送。但是,作为一种妥协,我当然降低了非交互式shell的安全性。

您可以尝试使用绝对路径吗,即
/home/component/bin/git upload pack
?我尝试过,但恐怕没有乐趣。