Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

-subj syntax doesn't work for git-for-windows / mingw users #2

Open
McGoffmann opened this issue Jun 20, 2023 · 0 comments
Open

-subj syntax doesn't work for git-for-windows / mingw users #2

McGoffmann opened this issue Jun 20, 2023 · 0 comments

Comments

@McGoffmann
Copy link

For

SUBJECT="/C=US/ST=Pennsylvania/L=Springfield/O=Globomantics/OU=IT/CN=Contoso"
, the following will work instead:
SUBJECT="//C=US\ST=Pennsylvania\L=Springfield\O=Globomantics\OU=IT\CN=Contoso"

openssl req -new -key $certPath/server1.key -out $certPath/server1.csr -subj "/CN=server1/O=server1" -config "$certPath/server1.conf"

openssl req -new -key $certPath/server1.key -out $certPath/server1.csr -subj "//CN=server1\O=server1" -config "$certPath/server1.conf"

Otherwise, bash tries to convert it to a path:
https://stackoverflow.com/questions/54258996/git-bash-string-parameter-with-at-start-is-being-expanded-to-a-file-path
https://www.appsloveworld.com/bash/100/3/running-openssl-from-a-bash-script-on-windows-subject-does-not-start-with

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

No branches or pull requests

1 participant