From 6a8bc980f186c4ee4084439e3a7e944c9b947588 Mon Sep 17 00:00:00 2001 From: aashi-ihsaa <96407263+aashi-ihsaa@users.noreply.github.com> Date: Mon, 29 May 2023 13:23:12 +0530 Subject: [PATCH 1/3] Update README.md If brew command is not working on linux, then this can also be used. --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 6b47a0f4..58c70e06 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,13 @@ Then you can install using [Homebrew on Linux](https://docs.brew.sh/Homebrew-on- brew install mkcert ``` +If brew command is not working on linux, in the case of Ubuntu or other Debian-based distributions, you can use the apt package manager to install mkcert. Here's the command you can use: + +``` +sudo apt update +sudo apt install mkcert +``` + or build from source (requires Go 1.13+) ``` From 1478b78cd848ddc313d99f49f60496cc68343bb4 Mon Sep 17 00:00:00 2001 From: Damian Poddebniak Date: Fri, 3 Nov 2023 19:50:43 +0100 Subject: [PATCH 2/3] Use `
` in installation section --- README.md | 160 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 123 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 58c70e06..b1384620 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ mkcert is a simple tool for making locally-trusted development certificates. It requires no configuration. -``` +```sh $ mkcert -install Created a new local CA 💥 The local CA is now installed in the system trust store! ⚡️ @@ -29,92 +29,178 @@ mkcert automatically creates and installs a local CA in the system root store, a ## Installation -> **Warning**: the `rootCA-key.pem` file that mkcert automatically generates gives complete power to intercept secure requests from your machine. Do not share it. +> [!WARNING] +> **Do not share the `rootCA-key.pem` file!** This file gives complete power to intercept secure requests from your machine. -### macOS +
+macOS -On macOS, use [Homebrew](https://brew.sh/) +
+Homebrew -``` +See [Homebrew](https://brew.sh/). + +```sh brew install mkcert -brew install nss # if you use Firefox +# If you use Firefox: +brew install nss ``` +
-or [MacPorts](https://www.macports.org/). +
+MacPorts -``` +See [MacPorts](https://www.macports.org). + +```sh sudo port selfupdate sudo port install mkcert -sudo port install nss # if you use Firefox +# If you use Firefox: +sudo port install nss ``` +
-### Linux +
-On Linux, first install `certutil`. +
+Linux -``` +
+APT (Debian, Ubuntu, ...) + +First, install `certutil`: + +```sh sudo apt install libnss3-tools - -or- -sudo yum install nss-tools - -or- -sudo pacman -S nss - -or- -sudo zypper install mozilla-nss-tools ``` -Then you can install using [Homebrew on Linux](https://docs.brew.sh/Homebrew-on-Linux) +Then, install `mkcert`: +```sh +sudo apt install mkcert ``` -brew install mkcert +
+ +
+pacman (Arch, ...) + +First, install `certutil`: + +```sh +sudo pacman -S nss ``` -If brew command is not working on linux, in the case of Ubuntu or other Debian-based distributions, you can use the apt package manager to install mkcert. Here's the command you can use: +Then, install `mkcert`: +```sh +sudo pacman -Syu mkcert ``` -sudo apt update -sudo apt install mkcert +
+ +
+Yum (Fedora, ...) + +First, install `certutil`: + +```sh +sudo yum install nss-tools ``` -or build from source (requires Go 1.13+) +Then, follow the [alternative steps below](#linux-alternative). +
+ +
+Zypper (openSUSE, ...) + +First, install `certutil`: +```sh +sudo zypper install mozilla-nss-tools ``` -git clone https://github.com/FiloSottile/mkcert && cd mkcert -go build -ldflags "-X main.Version=$(git describe --tags)" + +Then, follow the [alternative steps below](#linux-alternative). +
+ +#### Linux (Alternative) + +
+Homebrew on Linux + +See [Homebrew on Linux](https://docs.brew.sh/Homebrew-on-Linux). + +```sh +brew install mkcert ``` +
-or use [the pre-built binaries](https://github.com/FiloSottile/mkcert/releases). +
+Build from source (requires Go 1.13+) +```sh +git clone https://github.com/FiloSottile/mkcert +cd mkcert +go build -ldflags "-X main.Version=$(git describe --tags)" ``` +
+ +
+Use pre-built binaries + +See [pre-built binaries](https://github.com/FiloSottile/mkcert/releases). + +```sh curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64" chmod +x mkcert-v*-linux-amd64 sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert ``` +
-For Arch Linux users, [`mkcert`](https://www.archlinux.org/packages/community/x86_64/mkcert/) is available on the official Arch Linux repository. +
-``` -sudo pacman -Syu mkcert -``` +
+Windows -### Windows +
+Chocolatey -On Windows, use [Chocolatey](https://chocolatey.org) +See [Chocolatey](https://chocolatey.org). -``` +```sh choco install mkcert ``` +
-or use Scoop +
+Scoop -``` +See [Scoop](https://scoop.sh/). + +```sh scoop bucket add extras scoop install mkcert ``` +
-or build from source (requires Go 1.10+), or use [the pre-built binaries](https://github.com/FiloSottile/mkcert/releases). +#### Windows (Alternative) + +
+Build from source (requires Go 1.10+) + +```sh + +``` +
+ +
+Use pre-built binaries + +See [pre-built binaries](https://github.com/FiloSottile/mkcert/releases). +
If you're running into permission problems try running `mkcert` as an Administrator. +
+ ## Supported root stores mkcert supports the following root stores: From 82247e8901f08a109a726bcc52d6621236d2b129 Mon Sep 17 00:00:00 2001 From: Damian Poddebniak Date: Fri, 3 Nov 2023 20:35:23 +0100 Subject: [PATCH 3/3] Fix typos and improve wording in README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b1384620..fbaae043 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ The certificate is at "./example.com+5.pem" and the key at "./example.com+5-key.

Chrome and Firefox screenshot

-Using certificates from real certificate authorities (CAs) for development can be dangerous or impossible (for hosts like `example.test`, `localhost` or `127.0.0.1`), but self-signed certificates cause trust errors. Managing your own CA is the best solution, but usually involves arcane commands, specialized knowledge and manual steps. +Using certificates from real certificate authorities (CAs) for development can be dangerous or impossible (for hosts like `example.test`, `localhost`, or `127.0.0.1`), but self-signed certificates cause trust errors. Managing your own CA is the best solution, but it usually involves arcane commands, specialized knowledge, and manual steps. mkcert automatically creates and installs a local CA in the system root store, and generates locally-trusted certificates. mkcert does not automatically configure servers to use the certificates, though, that's up to you. @@ -197,7 +197,7 @@ scoop install mkcert See [pre-built binaries](https://github.com/FiloSottile/mkcert/releases).
-If you're running into permission problems try running `mkcert` as an Administrator. +If you're encountering permission problems, try running `mkcert` as an Administrator. @@ -258,7 +258,7 @@ mkcert filippo@example.com ### Mobile devices -For the certificates to be trusted on mobile devices, you will have to install the root CA. It's the `rootCA.pem` file in the folder printed by `mkcert -CAROOT`. +For the certificates to be trusted on mobile devices, you must install the root CA. It's the `rootCA.pem` file in the folder printed by `mkcert -CAROOT`. On iOS, you can either use AirDrop, email the CA to yourself, or serve it from an HTTP server. After opening it, you need to [install the profile in Settings > Profile Downloaded](https://github.com/FiloSottile/mkcert/issues/233#issuecomment-690110809) and then [enable full trust in it](https://support.apple.com/en-nz/HT204477). @@ -274,13 +274,13 @@ export NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem" ### Changing the location of the CA files -The CA certificate and its key are stored in an application data folder in the user home. You usually don't have to worry about it, as installation is automated, but the location is printed by `mkcert -CAROOT`. +The CA certificate and its key are stored in an application data folder in the user home. You usually don't have to worry about it, as the installation is automated, but the location is printed by `mkcert -CAROOT`. -If you want to manage separate CAs, you can use the environment variable `$CAROOT` to set the folder where mkcert will place and look for the local CA files. +If you want to manage separate CAs, use the environment variable `$CAROOT` to set the folder where mkcert will place and look for the local CA files. ### Installing the CA on other systems -Installing in the trust store does not require the CA key, so you can export the CA certificate and use mkcert to install it in other machines. +Installing in the trust store does not require the CA key, so you can export the CA certificate and use mkcert to install it on other machines. * Look for the `rootCA.pem` file in `mkcert -CAROOT` * copy it to a different machine