search

Home  >  Q&A  >  body text

git - Do I need to enter my username and password every time I push to the remote repository?

I remember not using it before. Is there something wrong?

滿天的星座滿天的星座2790 days ago637

reply all(4)I'll reply

  • 黄舟

    黄舟2017-05-02 09:52:37

    Used https when adding the remote library. . So every time I have to use https to push to the remote library, the speed is still slow. .

    View the transport protocol used:

    git remote -v

    Reset to ssh method:

    git remote rm origin
    git remote add origin git@github.com:username/repository.git
    git push -u origin master

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-02 09:52:37

    git config --global credential.helper store

    reply
    0
  • 阿神

    阿神2017-05-02 09:52:37

    git config --global credential.helper "store"
    

    You can see it in the .gitconfig file after configuration

    reply
    0
  • PHPz

    PHPz2017-05-02 09:52:37

    Because you are currently using the https submission method, just change it to the ssh method.

    reply
    0
  • Cancelreply