我在Github官方的帮助手册上看到了这句话:
When you
git clone
,git fetch
,git pull
, orgit push
to a remote repository using HTTPS URLs on the command line, you'll be asked for your GitHub username and password.
当你在命令行中使用HTTPS的URL来对远程仓库进行git clone
,git fetch
,git pull
, 或者git push
操作时,你会被要求输入Github的用户名和密码。
但是实际上我在git clone
(使用http协议)从来没遇到过要求输入用户名和密码,难道是帮助文档写错了吗?
NOTE:本问题源于本站的另一个问题,我在回答其他人的问题时,突然想到了这个问题。
PHP中文网2017-05-02 09:49:33
It is very likely that you have entered it before
Because I have encountered it before and had to enter the account number and password
I don’t know what the situation is on your side
I didn’t enter it again when I submitted it
为情所困2017-05-02 09:49:33
If the project is open source, you do not need to enter the username or password when executing git clone
. You will only be asked to enter the account password when submitting the code after modifying the project.