python - 有人使用过 fabric 么?
PHPz
PHPz 2017-04-18 09:27:45
0
2
584

在使用fabriccoding.netclone一个自己的仓库,但是在clone的时候需要输入用户名和密码。请问如何向stdin中输入信息,或者不用用户名和密码登录?谢谢

PHPz
PHPz

学习是最好的投资!

reply all(2)
Ty80

I have tried it, and there are two solutions

Use ssh key

ssh-keygen -t rsa -C 'you_email@youremail.com'
  1. Transfer the public key to your github account

  2. Log in to your github (coding) account and add ssh key

  3. Modify your local ssh remote url instead of https protocol and use git protocol instead

Use https protocol directly

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

迷茫

Add your own SSH public key to coding.net:

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!