Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Get CA key error: permission denied #144

Closed
kacpekwasny opened this issue Mar 4, 2022 · 7 comments
Closed

Get CA key error: permission denied #144

kacpekwasny opened this issue Mar 4, 2022 · 7 comments

Comments

@kacpekwasny
Copy link

I am following the instructions step by step, I am on Windows 10:

$ git clone https://github.com/square/certstrap  
$ cd certstrap
$ go build 
$ ./certstrap.exe init --common-name CertAuth
$ ./certstrap.exe request-cert --common-name Alice
$ ./certstrap.exe sign Alice --CA CertAuth
Enter passphrase for CA key (empty for no passphrase): [all passwords are empty]
Get CA key error:  permission denied

I am on windows in powershell.
I also tried this fully on WSL debian but with following error:
Get certificate request error: permission denied

@kacpekwasny
Copy link
Author

Did this on a VPS running debian and it worked.
I don't know if this is a reason to close this issue as it isn't really fixed.

@ekremparlak
Copy link

ekremparlak commented Mar 4, 2022

Same error happening to me on Debian 11 but i am using binary from release page.

EDIT: same error when building with master branch

@jdtw
Copy link
Contributor

jdtw commented Mar 28, 2022

I can't repro on Mac OS master branch. What are the permissions for the key and CSR files?

@aperez456-nobody
Copy link

I think the issue has to do with the version of go you are using to build.
I tried to build project with go version 1.16.7, then
I tried the precompiled binary and was able to resolve this.
https://github.com/square/certstrap/releases/tag/v1.2.0

@isemaya-square
Copy link
Contributor

I also built the project with go version 1.16.7, and used
https://github.com/square/certstrap/releases/tag/v1.2.0 and was able to sign.

@isemaya-square
Copy link
Contributor

I was also able to built the project with go version 1.18.1 (latest version), and used
https://github.com/square/certstrap/releases/tag/v1.2.0 and was able to sign.

@isemaya-square
Copy link
Contributor

Hi kacpekwasny. Thanks again for for flagging this. The issue should be fixed in #155 - can you try cloning the latest version of certstrap in windows and running the steps again?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants