1. 在使用git pull、git push、git clone会报类似如下的错误:
sudo git clone https://github.com/pcduino/a20-kernel
fatal: HTTP request failed
使用如下指令查看版本:
# git --version
git version 1.7.0.1
2. 报错fatal: Unable to find remote helper for 'https'
是因为git 是通过curl请求网络的。仔细检查发现
<span style="font-family: Arial, Helvetica, sans-serif;">checking for curl_global_init in -lcurl... no</span>
安装 curl及curl-devel
yum install curl curl-devel
sudo git clone https://github.com/pcduino/a20-kernel
fatal: HTTP request failed
一般是由于以下几种问题造成的:
1)Git版本的问题。
使用如下指令查看版本:
# git --version
git version 1.7.0.1
可以通过安装更高的版本解决问题
2)系统的时间不对
使用命令
date -s "25 MAY 2015 13:45:00"
修改时间即可。
2. 报错fatal: Unable to find remote helper for 'https'
是因为git 是通过curl请求网络的。仔细检查发现
<span style="font-family: Arial, Helvetica, sans-serif;">checking for curl_global_init in -lcurl... no</span>
安装 curl及curl-devel
yum install curl curl-devel
然后重新编译即可,即三步走。
3)权限不对
这是权限问题,可以修改.git/config文件追加用户名和密码
详细:
From:http://stackoverflow.com/questions/7438313/pushing-to-git-returning-error-code-403-fatal-http-request-failed
To definitely be able to login using https protocol, you should first set your authentication credential to the git Remote URI:
git remote set-url origin https://yourusername@github.com/user/repo.git
Then you'll be asked for a password when trying to
详细:
From:http://stackoverflow.com/questions/7438313/pushing-to-git-returning-error-code-403-fatal-http-request-failed
To definitely be able to login using https protocol, you should first set your authentication credential to the git Remote URI:
git remote set-url origin https://yourusername@github.com/user/repo.git
Then you'll be asked for a password when trying to
git push.
In fact, this is on the http authentication format. You could set a password too:
https://youruser:password@github.com/user/repo.git
You should be aware that if you do this, your github password will be stored in plaintext in your .git directory, which is obviously undesirable.
In fact, this is on the http authentication format. You could set a password too:
https://youruser:password@github.com/user/repo.git
You should be aware that if you do this, your github password will be stored in plaintext in your .git directory, which is obviously undesirable.