在与小牛的Mac mini上,我在尝试从私有git服务器克隆克隆时出现身份验证问题。我已经在Windows和Ubuntu上用同一台服务器安装并配置好几次git,并且之前没有这种问题。我对下一步尝试的方式感到不知所措。在mac git通过https克隆无法进行身份验证
症状:
git clone https://[email protected]:8448/git/libs/project.git
Cloning into 'project' ...
Password for 'https://[email protected]:8448': [1] note
fatal: Authentication failed for 'https://[email protected]:8448/git/libs/project.git'
[1]我不是问这个在其他系统上。我相信我已经配置我的git客户端不要求密码。没有密码我提供擅长此提示
我有这样我的〜/的.gitconfig:
[http]
sslKey = /Users/macuser/auth/username.key
sslCert = /Users/macuser/auth/username.pem
sslVerify = false
[user]
name = username
email = [email protected]
我建立我放在一个文件夹名为我的客户证书时收到下列文件〜/ AUTH:
username.cer
username.p12
username.pem
ca.cer
我跑这个命令生成密钥文件:
openssl rsa -in /Users/macuser/auth/username.pem -out /Users/macuser/auth/username.key
然后我跑混帐配置命令如:
git config --global http.sslKey /Users/macuser/auth/username.key
git config --global http.sslCert /Users/macuser/auth/username.pem
git config --global http.sslVerify false
配置混帐就像上面的步骤,就当我做其他系统后一个'git克隆https'它只是起作用。在安装了Xcode命令行工具的OS X Mavericks上,git无法进行身份验证。
我在做什么错?
在此先感谢。
编辑:
我以为我想补充这条信息。服务器正在使用自签名证书,或者来自无权限的证书。这就是为什么我将http.sslVerify设置为false。
以下是详细的克隆命令。 Linux和Mac上的设置相同,保存为auth文件夹位置。 Linux版本成功,而Mac版本失败。
http://cache.codebot.org/stackoverflow/linux-git-works.txt
http://cache.codebot.org/stackoverflow/mac-git-fails.txt
答:
sudo port install git-core
从你提供的,你是在Linux和Mac上的Git 1.8.3.4使用Git 1.8.3.2日志,所以这些都是非常接近,而Git的更新日志不建议任何可疑的变化,可能是负责对于你观察到的不同行为。那么curl或libcurl怎么样(我不确定Git如何使用curl)?你在两台机器上使用哪个版本? – herzbube