Skip to content

Commit 5521657

Browse files
authored
fix(docs): Revise credential storage recommendations in README
1 parent c9e9d97 commit 5521657

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,6 @@ After the token is generated, create an rc file with the following content:
8989
Note: you could use `ncu-config` to configure these variables, but it's not
9090
recommended to leave your tokens in your command line history.
9191

92-
If you have `gpg` installed and setup on your local machine, it is recommended
93-
to store an encrypted version of this file:
94-
95-
```console
96-
$ gpg --default-recipient-self --encrypt ~/.ncurc
97-
$ rm ~/.ncurc
98-
```
99-
10092
### Setting up Jenkins credentials
10193

10294
The `git-node` and `ncu-ci` commands need to query the Node.js Jenkins API for
@@ -124,14 +116,29 @@ To obtain the Jenkins API token
124116
}
125117
```
126118

119+
### Protecting your credentials
120+
121+
If you have `gpg` installed and setup on your local machine, it is strongly recommended
122+
to store an encrypted version of this file:
127123

128-
### Make sure your credentials won't be committed
124+
```console
125+
$ gpg --default-recipient-self --encrypt ~/.ncurc
126+
$ rm ~/.ncurc
127+
# The credentials are now encrypted in ~/.ncurc.gpg and everytime it's needed,
128+
# node-core-utils will invoke gpg that may ask you to decrypt it using
129+
# your default key via pinentry.
130+
```
129131

130132
Put the following entries into your
131133
[global `gitignore` file](https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreexcludesFile)
132-
(`$XDG_CONFIG_HOME/git/ignore` or a file specified by `core.excludesFile`):
134+
(`$XDG_CONFIG_HOME/git/ignore` or a file specified by `core.excludesFile`). For example:
135+
136+
```console
137+
$ git config --global core.excludesfile ~/.gitignore_global
138+
```
133139

134140
```
141+
# In ~/.gitignore_global
135142
# node-core-utils configuration file
136143
.ncurc
137144
.ncurc.gpg

0 commit comments

Comments
 (0)