search

Home  >  Q&A  >  body text

python - 有人使用过 fabric 么?

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

PHPzPHPz2820 days ago625

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-18 09:29:45

    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

    reply
    0
  • 迷茫

    迷茫2017-04-18 09:29:45

    Add your own SSH public key to coding.net:

    reply
    0
  • Cancelreply