Home  >  Article  >  Backend Development  >  Why does pull always prompt for password?

Why does pull always prompt for password?

零下一度
零下一度Original
2017-06-23 16:19:591592browse

Every time you synchronize or upload code to the code base on githun, you need to enter your username and password every time. In this case, we can save these by setting an SSH key. Trouble. If you use TortoiseGit as the local github management tool, TortoiseGit uses the secret key with the extension ppk instead of the rsa key generated by ssh-keygen. In other words, the key generated by using ssh-keygen -C "username@email.com" -t rsa cannot be used in TortoiseGit. Development based on github must use rsa keys, so TortoiseGit's putty key generator tool needs to be used to generate both rsa keys suitable for github and ppk keys suitable for TortoiseGit.

Method/Step

  1. ##Open PuttyGen under TortoiseGit, click the Generate button in the opened window, a green progress bar will appear, wait for the generation, you can shake the mouse more during the generation process to increase randomness.

    应用TortoiseGit为github账号添加SSH keys
    应用TortoiseGit为github账号添加SSH keys
  2. ##After generation Copy all the generated content and leave the window open for now.

    应用TortoiseGit为github账号添加SSH keys
  3. ##Log in to github and click on the settings chart on the upper right. After entering the settings page, select SSH key in the left option and click Add SSH key. Fill in the name of the SSH key in the interface that appears. Just fill in whatever you like, then paste the content you just copied into the key and click add key. That's it.

    应用TortoiseGit为github账号添加SSH keys
    应用TortoiseGit为github账号添加SSH keys
    应用TortoiseGit为github账号添加SSH keys
    应用TortoiseGit为github账号添加SSH keys
  4. # Return to the second step window, click the Save private key button to save it as a private key suitable for TortoiseGit with the extension .ppk.

  5. Run the Pageant program in the TortoiseGit start menu. After the program is started, it will automatically dock in the taskbar. Double-click the icon to pop up the key Manage list.

    应用TortoiseGit为github账号添加SSH keys
    应用TortoiseGit为github账号添加SSH keys
    应用TortoiseGit为github账号添加SSH keys
    #

    Click add key in the pop-up key management list, add the private key (.ppk) file saved in step 4, and close the dialog box.

    After the above configuration, you can use TortoiseGit to perform push and pull operations without having to enter a password every time.

The above is the detailed content of Why does pull always prompt for password?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn