Git's https or HTTP way to set the remember user name and password method

Source: Internet
Author: User

HTTPS mode every time you have to enter a password, according to the following settings can be entered once without having to enter the password trouble and enjoy the speed of HTTPS

Set Remember password (default 15 minutes):

git config--global credential.helper cache

If you want to set your own time, you can do this:

git config credential.helper ' cache--timeout=3600 '

This is set to expire after one hours.

Long-term storage password:

git config--global credential.helper store

It is also possible to take a password when adding a remote address. Recommended

Http://yourname:[email Protected]/name/project.git

Add: You can also store passwords using the client.

If you are using SSH and want to experience the high speed that HTTPS brings, then you can do this: switch to the project directory:

CD projectfile/

Remove the warehouse address from remote SSH mode

Git remote RM origin

Add HTTPS remote Warehouse address

Git remote add Origin http://yourname:[email Protected]/name/project.git

Git's https or HTTP way to set the remember user name and password method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.