AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 409616
Accepted
Jayen
Jayen
Asked: 2012-07-21 05:12:49 +0800 CST2012-07-21 05:12:49 +0800 CST 2012-07-21 05:12:49 +0800 CST

git 拒绝通过 HTTP 发送凭据

  • 772

curl似乎工作正常,但git没有。git要求输入密码,但随后不发送任何凭据。

作品:curl --netrc http://test.git.unsw.edu.au/和curl -u username:password http://test.git.unsw.edu.au/

不起作用:git remote update

Password for 'http://[email protected]': 
* Couldn't find host test.git.unsw.edu.au in the .netrc file; using defaults
User-Agent: git/1.7.9.5
Host: test.git.unsw.edu.au
Accept: */*
Pragma: no-cache

为什么不git发送凭据?

从一个strace,我看到:

  1. 读.netrc
  2. GET /repo/info/refs?service=git-receive-pack HTTP/1.1- 没有凭证
  3. HTTP/1.0 401 Unauthorized
  4. 读.netrc
  5. GET /repo/info/refs?service=git-receive-pack HTTP/1.0- 没有凭证
  6. HTTP/1.0 401 Unauthorized
  7. 提示输入密码
  8. 读.netrc
  9. * Couldn't find host test.git.unsw.edu.au in the .netrc file; using defaults
  10. GET /repo/info/refs?service=git-receive-pack HTTP/1.1- 没有凭证
  11. HTTP/1.0 401 Unauthorized
authentication
  • 2 2 个回答
  • 4452 Views

2 个回答

  • Voted
  1. Best Answer
    Jayen
    2012-07-22T17:07:16+08:002012-07-22T17:07:16+08:00

    Git 似乎只使用CURLAUTH_ANY它不适用于我的特定 Web 服务器。我的网络服务器支持Negotiate和,所以当客户端不可用时BasicGit 不会回退。BasicNegotiate

    此外,Git 似乎没有选择使用CURLAUTH_ANY.

    • 1
  2. Jenny D
    2012-07-21T06:26:20+08:002012-07-21T06:26:20+08:00

    查看联机帮助页,似乎 git 在与 http 一起使用时不采用用户名选项。但是如果你把它放在你的 .netrc 文件中,curl 应该使用它。.netrc 的格式是

    machine hostname login yourusername password yourpassword
    
    • 0

相关问题

  • 如何在使用 RPC over HTTPS 时停止 Outlook 2007 要求提供凭据

  • 针对 Leopard 服务器的 OS X 登录身份验证

  • 允许用户更改其 Active Directory 密码的 Web 界面

  • MOSS 2007 无法使用 ActiveDirectoryMembershipProvider 配置表单身份验证

  • 通过 VPN 更改 Active Directory 密码

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve