Git + Eclipse: 401未授权错误

3
我可以帮助您翻译以下内容:

我在我的树莓派上有一个带有Apache的git存储库。
我使用git + smart http:从Linux客户端使用终端,一切正常。
例如,我可以使用以下命令克隆存储库:

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和Smart 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 for Web Developers. Version: Neon Release (4.6.0) Build id: 20160613-1800

  • EGit 4.4.0.20160607

1个回答

4

非常感谢!我在 Oxygen [4.7.0 M2] 上也遇到了这个问题。安装了所述的软件后,它开始正常工作了! - Nidhish Narayanan

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接