2016-09-28 123 views
3

我在rasperry pi上使用Apache进行git repo。
我使用git + smart http:来自Linux客户端,使用终端,一切正常。
例如,我可以使用以下命令克隆回购:Git + Eclipse:401未授权错误

git clone http://address:8080/git/repo_name 

的用户名和密码的插入后,它的工作原理。

但是,如果我想克隆使用Eclipse回购,这显示了这个错误:

enter image description here

这就是Apache的错误日志:

[Wed Sep 28 12:33:13.321726 2016] [negotiation:error] [pid 28020] [client 131.114.176.222:37524] AH00690: no acceptable variant: /usr/share/httpd/error/HTTP_UNAUTHORIZED.html.var 

这是我的apache配置(关于git和智能http):

<Directory "/usr/lib/git-core*"> 
    Options ExecCGI Indexes 
    Order allow,deny 
    Allow from all 
    Require all granted 
</Directory> 

<LocationMatch "^/.*/git-receive-pack$"> 
    Options +ExecCGI 
    AuthType Basic 
    AuthName "Git Login" 
    AuthUserFile /srv/git/.git-auth-file 
    Require valid-user 
</LocationMatch> 

<LocationMatch "^/.*/git-upload-pack$"> 
    Options +ExecCGI 
    AuthType Basic 
    AuthName "Git Login" 
    AuthUserFile /srv/git/.git-auth-file 
    Require valid-user 
</LocationMatch> 

SetEnv GIT_PROJECT_ROOT /srv/git 
SetEnv GIT_HTTP_EXPORT_ALL 
ScriptAlias /git/ /usr/lib/git-core/git-http-backend/ 

任何想法?

PS:我使用

  • 的Eclipse的Java EE IDE的Web开发。版本:霓虹发行(4.6.0)建立ID:20160613-1800

  • 例如:It 4.4.0.20160607

回答