search

Home  >  Q&A  >  body text

How to let the git command line save the login status of github

Administrator@changwei MINGW64 /d/github/git-study-test (master)
$ git push
Username for 'https://github.com': 867597730@qq.com

Every time I push, I am asked to enter the account and password of the github website. Is there any way to save the password or login status? I have used keygen to build ssh before and submitted the public key to the ssh settings on the official github website, but it seems to be of no use. . .

扔个三星炸死你扔个三星炸死你2745 days ago1076

reply all(5)I'll reply

  • 仅有的幸福

    仅有的幸福2017-06-16 09:21:11

    @Memory Time I would like to add that first check whether your push address is using the ssh protocol

    git remote -v

    If it starts with https, you need to change it, for example

    https://github.com/laravel/laravel.git
    要换成这个
    git@github.com:laravel/laravel.git

    Perform the steps above

    git remote rm origin
    git remote add origin git@github.com:laravel/laravel.git*
    git pull

    When you execute git pull, you may be prompted git set-upstream....The balabala prompts you to bind the local branch and the remote branch. Just follow the prompts

    There is another way to change the remote resource address to

    git remote set-url origin https://<username>:<password>@github.com/<username>/<repo_name>.git
    

    Write the account password into the remote address

    http://blog.justwe.site/2017/...

    reply
    0
  • 学习ing

    学习ing2017-06-16 09:21:11

    Delete the remote repository first

    git remote rm origin

    To add a remote warehouse, you need to use the ssh protocol

    git temote add origin ***

    reply
    0
  • 为情所困

    为情所困2017-06-16 09:21:11

    First of all, SSH is definitely right.

    Try this. /a/11...

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-06-16 09:21:11

    Set the config file in the hidden .git directory:

    [credential]    
        helper = store

    reply
    0
  • 三叔

    三叔2017-06-16 09:21:11

    Configure ssh, is it not configured properly?

    reply
    0
  • Cancelreply