mirror of
https://github.com/FiloSottile/mkcert.git
synced 2026-04-25 13:36:02 +03:00
[GH-ISSUE #602] when user doesn't have root sudo, install should print the commands to run with root privileges #334
Labels
No labels
TLS stack issue
Windows
bug
duplicate
duplicate
enhancement
help wanted
help wanted
pull-request
question
question
root store
waiting for info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mkcert#334
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dcaillibaud on GitHub (Aug 22, 2024).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/602
Root privilege with sudo is common on ubuntu but it's not the only linux distribution !
"Normal" users without sudo are common, with admin task done with a lot of others way (root ssh access, root password, other admin user…).
In that case, a
mkcert -installfails (it loops on asking the sudo password that doesn't exists), it should ask if user wants to try another sudo pass or give the root password or print the commands that needs to be run by root.@iamprogrammerlk commented on GitHub (Sep 27, 2024):
I think you can install CA manually by using Firefox.
Go to
Settingson Firefox then SearchCertificate, click on theView Certificatebutton thenImport.You can find the
rootCA.peminstalled location by runningmkcert --CAROOT.@h43z commented on GitHub (Jan 14, 2025):
mkcert does not run with sudo if the Uid == 0 (https://github.com/FiloSottile/mkcert/blob/master/main.go#L383C1-L385C3).
So you should be able to run
mkcert -installas root just fine.But If you want to install the CA it for a specific non-root user, run it as root (from a root shell) but temporarily overwrite the HOME variable.
@dcaillibaud commented on GitHub (Jan 17, 2025):
Yes, I found this digging in the install script, but it wasn't so easy.
I open this issue to suggest an install script improvement, giving the choice to print this command, or printing it if sudo fails.