简体   繁体   English

从Apache Http Server上托管的git存储库中克隆时出现Eclipse造成的401未授权错误

[英]401 Unauthorized error by eclipse while cloning from git repository hosted on Apache Http Server

I have hosted git repository on Apache Http server and I have used Basic Authentication and git (git-http-backend.exe). 我已经在Apache Http服务器上托管了git存储库,并且使用了基本身份验证和git(git-http-backend.exe)。

I can clone, pull, push using command promt by providing username and password but When, I tried to clone through eclipse (mars.1) is showing 我可以通过提供用户名和密码使用命令promt进行克隆,拉取和推送,但是何时,我尝试通过eclipse(mars.1)进行克隆

401 Unauthorized 401未经授权

在此处输入图片说明

Below is my httpd.conf 以下是我的httpd.conf

SetEnv GIT_PROJECT_ROOT C:/Repositories
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER
ScriptAliasMatch \
    "(?x)^/(.*/(HEAD | \
      info/refs | \
        objects/(info/[^/]+ | \
          [0-9a-f]{2}/[0-9a-f]{38} | \
            pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
              git-(upload|receive)-pack))$" \
                    "C:/Program Files/Git/mingw64/libexec/git-core/git-http-backend.exe/$1"  


# Authentication
<LocationMatch "^/.*/git-receive-pack$">
    Options +ExecCGI
    #Options +Indexes +FollowSymLinks +ExecCGI
    AuthType Basic
    AuthName "Git Login"
    AuthUserFile "C:/Apache24/bin/gituserpass.git"
    Require user ensys
    Require valid-user
</LocationMatch>


<LocationMatch "^/.*/git-upload-pack$">
    Options +ExecCGI
    #Options +Indexes +FollowSymLinks +ExecCGI
    AuthType Basic
    AuthName "Git Login"
    AuthUserFile "C:/Apache24/bin/gituserpass.git"
    Require user ensys    
</LocationMatch>

<Directory />
Require all granted
</Directory>

It is a bug that has beend adressed here . 这是在这里已经解决的一个错误。 Basically, the private git servers got broken following an update on Git that made it do a pre-verification of credentials (using stored or en-cache passwords). 基本上,在对Git进行更新后,专用git服务器会崩溃,这使得它可以对凭据进行预验证(使用存储的或缓存的密码)。 The password then gets modified/removed , and the final server (your git server in your case) throws a 401 . 然后修改/删除密码,最终服务器(您的git服务器)将抛出401

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Git + Eclipse:401未经授权的错误 - Git + Eclipse: 401 Unauthorized Error eclipse错误克隆来自tfs身份验证的git存储库不受支持 - eclipse error cloning git repository from tfs authentication not supported 如何修复:从GIT克隆项目时,http:// URL:Eclipse中未授权错误? - How to fix : http://URL: not authorized error in eclipse while cloning project from GIT? 克隆Git存储库时Packfile被截断错误 - Packfile is truncated error while cloning Git repository Eclipse,Git和Bitbucket - 无法推送 - 错误401未经授权 - Eclipse, Git and Bitbucket - Can't push - Error 401 Unauthorized Team Foundation Server - Eclipse 和跨平台:无法使用 Eclipse 中的 TEE 克隆 Git 存储库。 错误克隆 - 未授权 - Team Foundation Server - Eclipse and Cross Platform: Unable to clone Git repository using TEE in Eclipse. Error cloning - Not Authorized 使用eclipse克隆git存储库失败 - Cloning git repository failed using eclipse 如何在Eclipse的Git中配置“克隆存储库” - How to configure “cloning repository” in Eclipse's Git 克隆或推送 git 存储库时,Eclipse 中出现“无法打开 git-upload-pack”错误 - 'cannot open git-upload-pack' error in Eclipse when cloning or pushing git repository 使用Eclipse EGit在1and1共享Linux服务器中克隆1and1 git存储库时出现问题 - Problems cloning 1and1 git repository in 1and1 shared Linux server with Eclipse EGit
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM