# mkcert
Usage of mkcert:
$ mkcert -install
Install the local CA in the system trust store.
$ mkcert example
Generate "example.pem" and "example-key.pem".
$ mkcert example myapp.dev localhost 127.0.0.1 ::1
Generate "example+4.pem" and "example+4-key.pem".
$ mkcert "*.example.it"
Generate "_wildcard.example.it.pem" and "_wildcard.example.it-key.pem".
$ mkcert -uninstall
Uninstall the local CA (but do not delete it).
安装ca证书
代码语言:txt复制
# mkcert -install
Created a new local CA �
The local CA is now installed in the system trust store! ⚡️
The local CA is now installed in Java's trust store! ☕️
# mkcert "aaaa.demo"
Created a new certificate valid for the following names �
- "aaaa.demo"
The certificate is at "./aaaa.demo.pem" and the key at "./aaaa.demo-key.pem" ✅
It will expire on 18 July 2027 �
# mkcert -key-file key.pem -cert-file cert.pem example *.example
Created a new certificate valid for the following names �
- "example"
- "*.example"
Reminder: X.509 wildcards only go one level deep, so this won't match a.b.example ℹ️
The certificate is at "cert.pem" and the key at "key.pem" ✅
It will expire on 18 July 2027 �
或者
# mkcert "aaaa.demo" "bbbb.demo" "192.168.31.181"
Created a new certificate valid for the following names �
- "aaaa.demo"
- "bbbb.demo"
- "192.168.31.181"
The certificate is at "./aaaa.demo+2.pem" and the key at "./aaaa.demo+2-key.pem" ✅
It will expire on 18 July 2027 �
或者
$ mkcert example "*.example" example.test localhost 127.0.0.1 ::1
Created a new certificate valid for the following names
# mkcert
Usage of mkcert:
$ mkcert -install
Install the local CA in the system trust store.
$ mkcert example
Generate "example.pem" and "example-key.pem".
$ mkcert example myapp.dev localhost 127.0.0.1 ::1
Generate "example+4.pem" and "example+4-key.pem".
$ mkcert "*.example.it"
Generate "_wildcard.example.it.pem" and "_wildcard.example.it-key.pem".
$ mkcert -uninstall
Uninstall the local CA (but do not delete it).
安装ca证书
代码语言:txt复制
# mkcert -install
Created a new local CA �
The local CA is now installed in the system trust store! ⚡️
The local CA is now installed in Java's trust store! ☕️
# mkcert "aaaa.demo"
Created a new certificate valid for the following names �
- "aaaa.demo"
The certificate is at "./aaaa.demo.pem" and the key at "./aaaa.demo-key.pem" ✅
It will expire on 18 July 2027 �
# mkcert -key-file key.pem -cert-file cert.pem example *.example
Created a new certificate valid for the following names �
- "example"
- "*.example"
Reminder: X.509 wildcards only go one level deep, so this won't match a.b.example ℹ️
The certificate is at "cert.pem" and the key at "key.pem" ✅
It will expire on 18 July 2027 �
或者
# mkcert "aaaa.demo" "bbbb.demo" "192.168.31.181"
Created a new certificate valid for the following names �
- "aaaa.demo"
- "bbbb.demo"
- "192.168.31.181"
The certificate is at "./aaaa.demo+2.pem" and the key at "./aaaa.demo+2-key.pem" ✅
It will expire on 18 July 2027 �
或者
$ mkcert example "*.example" example.test localhost 127.0.0.1 ::1
Created a new certificate valid for the following names
发表评论