1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-08 23:25:51 +01:00

fix: update doc and output console to generate https

This commit is contained in:
Juan Picado @jotadeveloper 2018-02-16 08:03:33 +01:00
parent 5df9830c3a
commit 9c8abfb62e
No known key found for this signature in database
GPG Key ID: 18AC54485952D158
2 changed files with 11 additions and 11 deletions

@ -16,25 +16,25 @@ Once you update the listen and try to run verdaccio again will ask for certifica
* Generate your certificates * Generate your certificates
```` ````
$ openssl genrsa -out ~/.config/verdaccio/verdaccio-key.pem 2048 $ openssl genrsa -out /Users/user/.config/verdaccio/verdaccio-key.pem 2048
$ openssl req -new -sha256 -key ~/.config/verdaccio/verdaccio-key.pem -out ~/.config/verdaccio/verdaccio-csr.pem $ openssl req -new -sha256 -key /Users/user/.config/verdaccio/verdaccio-key.pem -out /Users/user/.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 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: https:
key: ~/.config/verdaccio/server.key key: /Users/user/.config/verdaccio/verdaccio-key.pem
cert: ~/.config/verdaccio/server.crt cert: /Users/user/.config/verdaccio/verdaccio-cert.pem
ca: ~/.config/verdaccio/server.ca 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. 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: https:
pfx: ~/.config/verdaccio/server.pfx pfx: /Users/user/.config/verdaccio/server.pfx
passphrase: 'secret' passphrase: 'secret'
```` ````

@ -110,9 +110,9 @@ function displayHTTPSWarning(storageLocation) {
'', '',
'And then add to config file (' + storageLocation + '):', 'And then add to config file (' + storageLocation + '):',
' https:', ' https:',
' key: verdaccio-key.pem', ` key: ${resolveConfigPath('verdaccio-key.pem')}`,
' cert: verdaccio-cert.pem', ` cert: ${resolveConfigPath('verdaccio-cert.pem')}`,
' ca: verdaccio-cert.pem', ` ca: ${resolveConfigPath('verdaccio-csr.pem')}`,
].join('\n')); ].join('\n'));
process.exit(2); process.exit(2);
} }