Remember git password when cloning from HTTP

Short note for GIT

  1. Create file .netrc in home directory
  2. Append machine record with username and password in that file with format
    machine <ip/hostname>
    username <username>
    password <password>
    ...
    

    In OSX, change username to login.

    machine <ip/hostname>
    login <username>
    password <password>
    ...
    
  3. Clone/Push again from netrc machine shouldn’t show any username/password prompt anymore.

About llun

Just a programmer

,