GoPass #security #build
# requires chocolatey
# iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
cinst golang git
$go_path = "c:\projects\go"
$env:GOPATH += ";$go_path"
go get -u github.com/justwatchcom/gopass
$exe_path = "$go_path\bin\gopass.exe"
if (!(Test-Path $exe_path)) {throw "gopass.exe build failed"}
# To make it available on the PATH quickly:
#import-module $env:chocolateyInstall\helpers\chocolateyInstaller.psm1
#Install-BinFile gopass $exe_path
#cinst gopass # once on chocolatey repository, will automatically install gpg-vanilla & git if needed.
cinst gpg-vanilla git
Update-SessionEnvironment #refresh PATH in current shell
To be used for automatic tests.
@"
%echo Generating a default key
Key-Type: default
Subkey-Type: default
Name-Real: John Doe
Name-Comment: with stupid passphrase
Name-Email: john.doe@foo.bar
Expire-Date: 0
Passphrase: test
# Do a commit here, so that we can later print "done" :-)
%commit
%echo done
"@ | Out-File johndoe -Encoding ascii
gpg --batch --gen-key johndoe
rm johndoe