git clone报错 The requested URL returned error: 403 Forbidden

参考网址:https://stackoverflow.com/questions/24008982/git-access-to-private-repository-using-https

当gitclone一个项目的时候报错

[root@localhost test]# git clone https://github.com/guyongpu/statweb.git
Initialized empty Git repository in /var/www/html/test/statweb/.git/
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/guyongpu/statweb.git/info/refs

fatal: HTTP request failed

解决办法

采用另一种形式clone:

git clone https://username:[email protected]/blah/blahblah.git

或者

git clone https://[email protected]/blah/blahblah.git

 如:

git clone https://zhangsan:[email protected]/guyongpu/statweb.git

git clone https://[email protected]/guyongpu/statweb.git

之后问题解决:

git clone报错 The requested URL returned error: 403 Forbidden_第1张图片

 

 

 

你可能感兴趣的:(ubuntu)