我用的是 SourceTree 做爲Git客戶端的,用它鏈接一個HTTPS證書過時的自建git服務,會收到下面錯誤:git
abort: error: _ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
fatal: repository 'https://****/guohongjun/mytest/' not found
Error validating server certificate for 'https://****:443':
- The certificate is not issued by a trusted authority. Use the fingerprint to validate the certificate manually!
- The certificate hostname does not match.
- The certificate has expired.
Certificate information:
- Hostname: *****
- Valid: from Thu, 12 Sep 2013 01:59:22 GMT until Fri, 12 Sep 2014 01:59:22 GMT
- Issuer: http://certs.godaddy.com/repository/, GoDaddy.com, Inc., Scottsdale, Arizona, US
- Fingerprint: a4:e0:66:ca:ba*******
(R)eject, accept (t)emporarily or accept (p)ermanently? svn: E175002: Unable to connect to a repository at URL 'https://******/guohongjun/mytest'
svn: E175002: OPTIONS of 'https://*****/guohongjun/mytest': Server certificate verification failed: certificate has expired, certificate issued for a different hostname, issuer is not trusted (https://*****) 服務器
這是由於 SourceTree 新建倉庫時,在 從URL 克隆時, 會去校驗 ssl,以下圖:svn
就是你在設置中設置了「禁止SSL校驗也不行」命令行
解決方案, 用命令行 clone 項目,而後經過添加已存在的本地倉庫來使用。orm
Git 全局設置server
git config --global user.name "郭紅俊" git config --global user.email guohongjun@***。**
建立倉庫,並更新到遠程服務器blog
mkdir mytest01 cd mytest01 git init touch README git add README git commit -m 'first commit' git remote add origin http://*****/guohongjun/mytest01.git git push -u origin master
Existing Git Repo 存在本地 Git Repossl
cd existing_git_repo git remote add origin http://118.194.63.8/guohongjun/mytest01.git git push -u origin master
在作遠程服務器提交以前,須要執行下面命令,禁用SSL校驗
git config --global http.sslVerify false rem
準備好本地庫相關get
提交到遠程服務器
這時候,咱們經過 新倉庫 - 新建本地已經存在的倉庫 方式就能夠增長了。