好吧,我是 git hub 新手。 今天总算把git hub弄好了,之前使用git push 一直报错, protocol https not supported or disabled in libcurl。
到 stack overflow 查了下,说是libcurl-4.dll不支持https协议。 但是,
curl --version可以看到https协议有支持。
which curl 看到 /bin/curl
看了下git hub 的系统log: %LOCALAPPDATA%\GitHub\TheLog.txt 和控制台一样的错误输出。
然后有人说使用 git config --global core.autocrlf true, 还是没作用。
最后还是 stack overflow拯救了我,
So you need to change your repo config on your PC to ssh way:
- edit
.git/config
file under your repo directory - find
url=
entry under section[remote "origin"]
- change it from
url=https://MichaelDrogalis@github.com/derekerdmann/lunch_call.git
tourl=ssh://git@github.com/derekerdmann/lunch_call.git
. that is, change all the texts before@
symbol tossh://git
- Save
config
file and quit. now you could usegit push origin master
to sync your repo on GitHub
之后就可以正常的上传自己的文件了, 步骤如下:
1. git add filepath
2. git commit -m "comments"
3. git remote add origin https://github.com/username/myproject.gt
通常第三步可以省掉,因为远程repository在配置文件中配好了
4. git push
然后在 git hub 客户端就可以同步远程repository上的内容了。
参考:
1. git config: http://blog.csdn.net/joe_007/article/details/7276195