Store Credentials When Installing with Bower
Environment
Product | Progress® Kendo UI® for jQuery Bower Installation |
Operating System | Windows 10 64bit |
Description
I get asked multiple times to provide my credentials while installing the Kendo UI Bower packages. How can I avoid this?
Solution
To preserve your credentials and handle the issue, use either of the following approaches:
- Cache your credentials by storing them as plain text in a
.netrc
file. - Store your credentials by using the Git credential helpers. For detailed information on how to do this, refer to Stack Overflow and follow the discussion on skipping the password typing.
Storing on Windows
- Caching your credentials is required if you use the Kendo UI Bower package in an ASP.NET vNext project.
- If your home directory contains spaces in its path (for example,
c:\Documents and Settings\jane
), Git might have problems resolving it. That is why you need to update your%HOME%
environment variable to point to a directory and exclude any spaces in its name.
- Create a text file called
_netrc
in your home directory—for example,c:\users\jane\_netrc
. -
Declare a
HOME
environment variable.C:\> SETX HOME %USERPROFILE%
-
Add the credentials using the format.
machine bower.telerik.com login my-telerik.identity@example.com password mysecret
Storing on Unix-Like Systems
-
In your home directory, create a file called
.netrc
(~/.netrc
). Verify that you modify the file permissions to make it readable only to you.touch ~/.netrc chmod 0600 ~/.netrc
-
Add your credentials to the
~/.netrc
file using the format demonstrated in the following example.machine bower.telerik.com login my-telerik.identity@example.com password mysecret