Avoiding Entering Username and Password for Git Operations

You can program a hidden file on your local machine to contain the machine name, login name and password for your account. When this file is present, Git will not prompt you for your credentials with each operation you execute.

Just type in the command below, authenticate once manually to any Qualcomm® Package Manager transaction that contacts the server, and then all subsequent times it refers to the ~/.git-credentials for authentication and will not prompt you for the password.

git config credential.helper store

Using the netrc file

An alternate, more manual method that works with older versions of Git is the system netrc file.

Windows: Create the _netrc file in your %HOME% directory (%HOME%/_netrc)

Mac\UNIX\LINUX: Create the .netrc file in your home directory (~/.netrc)

Note: There is no extension for the file. Adding an extension will cause this to fail

Format:

 machine some.host.qualcomm.com
 login my username
 password my password

Example:

 machine chipcode.qti.qualcomm.com 
 login joe 
 password joes-super-secret-password

 machine chipmaster2.qti.qualcomm.com 
 login joe 
 password joes-super-secret-password

Also note that you can make the format as a single line as well. Either one works:

 machine chipcode.qti.qualcomm.com login joe password joes-super-secret-password
 machine chipmaster2.qti.qualcomm.com login joe password joes-super-secret-password

If you contact multiple repositories, you can repeat these lines for each specific target server.

Regional Redirectory vs. San Diego

The URLs shown in ChipCode point to the regional redirector server by default. Those URLs do not have git in front of chipcode in the URL. The San Diego server does have git in front of the URL.

If you use the netrc file method, it is a good idea to specify both servers, depending on whether or not you need to clone from a regional server that is closer to you, or back to San Diego directly in case there is a problem with the regional server you are being redirected to.

chipmaster2.qti.qualcomm.com == Regional redirector server chipcode.qti.qualcomm.com == San Diego server direct

Regional Servers

Here is how the .netrc (non-Windows) or _netrc (Windows) file should read to have support for regional server and San Diego directly:

machine chipcode.qti.qualcomm.com login password machine git.chipcode.qti.qualcomm.com login password

Home Path Verification In Windows, you can check your home directory path by issuing these command:

 echo %HOME%

The result should be C:\Users. If not, you can try the following command to set your home directory properly:

 setx HOME %USERPROFILE% 

Known Errors

If you use “username” instead of “login”, Git will return error 500 while attempting to access the Git URL. Make sure your netrc file uses the proper field names, otherwise this error can occur.