mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-20 22:52:46 -05:00
fix: update doc and output console to generate https
This commit is contained in:
parent
5df9830c3a
commit
9c8abfb62e
2 changed files with 11 additions and 11 deletions
16
docs/ssl.md
16
docs/ssl.md
|
@ -16,25 +16,25 @@ Once you update the listen and try to run verdaccio again will ask for certifica
|
|||
* Generate your certificates
|
||||
|
||||
````
|
||||
$ openssl genrsa -out ~/.config/verdaccio/verdaccio-key.pem 2048
|
||||
$ openssl req -new -sha256 -key ~/.config/verdaccio/verdaccio-key.pem -out ~/.config/verdaccio/verdaccio-csr.pem
|
||||
$ openssl x509 -req -in ~/.config/verdaccio/verdaccio-csr.pem -signkey ~/.config/verdaccio/verdaccio-key.pem -out ~/.config/verdaccio/verdaccio-cert.pem
|
||||
$ openssl genrsa -out /Users/user/.config/verdaccio/verdaccio-key.pem 2048
|
||||
$ openssl req -new -sha256 -key /Users/user/.config/verdaccio/verdaccio-key.pem -out /Users/user/.config/verdaccio/verdaccio-csr.pem
|
||||
$ openssl x509 -req -in /Users/user/.config/verdaccio/verdaccio-csr.pem -signkey /Users/user/.config/verdaccio/verdaccio-key.pem -out /Users/user/.config/verdaccio/verdaccio-cert.pem
|
||||
````
|
||||
|
||||
* Edit your config file `~/.config/verdaccio/config.yaml` and add the following section
|
||||
* Edit your config file `/Users/user/.config/verdaccio/config.yaml` and add the following section
|
||||
|
||||
````
|
||||
https:
|
||||
key: ~/.config/verdaccio/server.key
|
||||
cert: ~/.config/verdaccio/server.crt
|
||||
ca: ~/.config/verdaccio/server.ca
|
||||
key: /Users/user/.config/verdaccio/verdaccio-key.pem
|
||||
cert: /Users/user/.config/verdaccio/verdaccio-cert.pem
|
||||
ca: /Users/user/.config/verdaccio/verdaccio-csr.pem
|
||||
````
|
||||
|
||||
Alternatively, if you have a certificate as `server.pfx` format, you can add the following configuration section. The passphrase is optional and only needed, if your certificate is encrypted.
|
||||
|
||||
````
|
||||
https:
|
||||
pfx: ~/.config/verdaccio/server.pfx
|
||||
pfx: /Users/user/.config/verdaccio/server.pfx
|
||||
passphrase: 'secret'
|
||||
````
|
||||
|
||||
|
|
6
src/lib/bootstrap.js
vendored
6
src/lib/bootstrap.js
vendored
|
@ -110,9 +110,9 @@ function displayHTTPSWarning(storageLocation) {
|
|||
'',
|
||||
'And then add to config file (' + storageLocation + '):',
|
||||
' https:',
|
||||
' key: verdaccio-key.pem',
|
||||
' cert: verdaccio-cert.pem',
|
||||
' ca: verdaccio-cert.pem',
|
||||
` key: ${resolveConfigPath('verdaccio-key.pem')}`,
|
||||
` cert: ${resolveConfigPath('verdaccio-cert.pem')}`,
|
||||
` ca: ${resolveConfigPath('verdaccio-csr.pem')}`,
|
||||
].join('\n'));
|
||||
process.exit(2);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue