在使用fabric
从coding.net
上clone
一个自己的仓库,但是在clone
的时候需要输入用户名和密码。请问如何向stdin
中输入信息,或者不用用户名和密码登录?谢谢
PHP中文网2017-04-18 09:29:45
I have tried it, and there are two solutions
ssh-keygen -t rsa -C 'you_email@youremail.com'
Transfer the public key to your github account
Log in to your github (coding) account and add ssh key
Modify your local ssh remote url instead of https protocol and use git protocol instead
This method is also possible
For example:
def update():
with cd(project_root):
run('git clone')
At that time, he will prompt you to enter your username and password, but this method has a disadvantage. If you accidentally enter the wrong one, just try it again