Git with Smart HTTP in Cygwin
来源:互联网 发布:网络整合营销理论 编辑:程序博客网 时间:2024/05/17 01:10
Executive summary: In order to use git in Cygwin with Smart HTTP style URLs, you need to also install the libsasl2
and ca-certificates
packages.
I recently set up a new Cygwin environment to test and document the process of cloning and using one of the OpenXC repositories from GitHub in Windows, since this is a very popular platform for many users. Unfortunately many people were being blocked at the very first step, just attempting to clone the repository.
GitHub transitioned a little while back to using Smart HTTP by default for all public repositories. This is great because even for folks that need to commit to repositories, they can skip the SSH key dance if they aren't already using that in their daily routine. This seems to be especially the case for Windows users.
So for OpenXC, a new users installs Cygwin with the "git" package and attempts to clone the repository, and it explodes:
$ git clone https://github.com/openxc/openxc-androidCloning into 'openxc-android'.../usr/lib/git-core/git-remote-https.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
I was able to figure out which library was missing by using cygcheck
:
$ cygcheck /usr/lib/git-core/git-remote-https.exeC:\cygwin\lib\git-core\git-remote-https.exe C:\cygwin\bin\cygcrypto-0.9.8.dll C:\cygwin\bin\cygwin1.dll C:\Windows\system32\KERNEL32.dll C:\Windows\system32\API-MS-Win-Core-RtlSupport-L1-1-0.dll C:\Windows\system32\ntdll.dll ... <snip> ... C:\cygwin\bin\cyglber-2-4-2.dll C:\cygwin\bin\cygldap-2-4-2.dll C:\cygwin\bin\cygssl-1.0.0.dll C:\cygwin\bin\cygssh2-1.dllcygcheck: track_down: could not find cygsasl2-2.dll
This tells me that libsasl2
is missing, so install that from the Cygwin package manager.
Try the clone again and it still fails:
$ git clone https://github.com/openxc/openxc-android.gitCloning into 'openxc-android'...error: error setting certificate verify locations: CAfile: /usr/ssl/certs/ca-bundle.crt CApath: none while accessing https://github.com/openxc/openxc-android.git/info/refsfatal: HTTP request failed
By default, Cygwin doesn't have the CA root certificates installed, so nothing using SSL will work properly. Install the ca-certificates
package to install those.
Finally, success:
$ git clone https://github.com/openxc/openxc-androidCloning into 'openxc-android'...remote: Counting objects: 13997, done.remote: Compressing objects: 100% (2759/2759), done.remote: Total 13997 (delta 7568), reused 13989 (delta 7560)Receiving objects: 100% (13997/13997), 9.30 MiB | 1.04 MiB/s, done.Resolving deltas: 100% (7568/7568), done.
This problem was a little difficult to debug because I don't think very many people encounter it. Typically when someone installs Cygwin, they also install a base set of packages that includes things like curl
. Well, one of the curl
package's many dependencies are both libsasl2
and ca-certificates
, which explains why many people do not encounter this problem.
http://christopherpeplin.com/2013/01/cygwin-git-https/
转自:http://blog.csdn.net/poisonchry/article/details/17153117
- Git with Smart HTTP in Cygwin
- Git with Smart HTTP in Cygwin
- git 服务器搭建 (git smart http)
- 4.6 服务器上的 Git - Smart HTTP
- 在centos中搭建基于smart http的git server
- 使用Smart HTTP和Gitweb搭建简易个人git服务器
- How to Use Linux Commands in Windows with Cygwin
- smart mobile with vehicle
- Git smart checkout
- Smart negotiating in business
- smart pointer in gamedev
- Smart Pointers in Boost
- Smart Constraints In SystemVerilog
- C# in smart device
- Smart Pointers in C++
- HTTP Server in 5 Lines With Webrick
- 在Ubuntu14.04上部署使用SMART HTTP的Git服务器
- Mel Modeling with Smart Transforms
- ios开发 CocoaPods管理本地库
- 不借助其它变量交换两变量值的三种算法
- 文件上传利器SWFUpload入门简易教程
- cocos2d-x 3.0 touch事件官方解释
- 关于聚类分析、判别分析、主成分分析、因子分析等多元统计分析方法
- Git with Smart HTTP in Cygwin
- 圆柱体求表面积
- html target属性
- 极光推送技术原理:移动无线网络长连接
- 38 个免费开源的 CSS 下拉导航菜单
- Java程序与数据库的连接
- python 实现 全角字符 传转换成 半角字符串
- 新HP服务器安装注意
- Hadoop远程调试