homebrew-delve
homebrew-delve copied to clipboard
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
admins-MBP:~ admin$ brew install go-delve/delve/delve /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin16/rbconfig.rb:213: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin16/rbconfig.rb:213: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 ==> Installing delve from go-delve/delve ==> Downloading https://github.com/derekparker/delve/archive/v1.0.0-rc.1.tar.gz Already downloaded: /Users/admin/Library/Caches/Homebrew/delve-1.0.0-rc.1.tar.gz security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain. ==> Generating dlv-cert ==> openssl req -new -newkey rsa:2048 -x509 -days 3650 -nodes -config dlv-cert.c ==> [SUDO] Installing dlv-cert as root ==> sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System. Last 15 lines from /Users/admin/Library/Logs/Homebrew/delve/02.sudo: 2017-08-21 16:38:32 +0800
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain dlv-cert.cer
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core): https://github.com/go-delve/homebrew-delve/issues
These open issues may also help: Mac install error, OS version 10.12.6, go version go1.8.3 https://github.com/go-delve/homebrew-delve/issues/17 The specified item could not be found in the keychain https://github.com/go-delve/homebrew-delve/issues/16 Issue updating to 0.12.2 https://github.com/go-delve/homebrew-delve/issues/12 Executable does not get installed on MacOS https://github.com/go-delve/homebrew-delve/issues/18 dlv-cert: no identity found https://github.com/go-delve/homebrew-delve/issues/1 deps: do not install go if it's available on the system https://github.com/go-delve/homebrew-delve/issues/9 Mac install Error https://github.com/go-delve/homebrew-delve/issues/3 Mac install Error https://github.com/go-delve/homebrew-delve/issues/7
To get around this, just run the last 2 commands manually.
openssl req -new -newkey rsa:2048 -x509 -days 3650 -nodes -config dlv-cert.cfg -extensions codesign_reqext -batch -out dlv-cert.cer -keyout dlv-cert.key
and
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain dlv-cert.cer
The content of dlv-cert.cfg is
[ req ]
default_bits = 2048 # RSA key size
encrypt_key = no # Protect private key
default_md = sha512 # MD to use
prompt = no # Prompt for DN
distinguished_name = codesign_dn # DN template
[ codesign_dn ]
commonName = "dlv-cert"
[ codesign_reqext ]
keyUsage = critical,digitalSignature
extendedKeyUsage = critical,codeSigning
This will get you pass the cert part. You should see
==> dlv-cert is already installed, no need to create it
Hit this problem as well. You also need to run:
sudo security import dlv-cert.key -A -k /Library/Keychains/System.keychain
Following these steps (only in 1) worked for me: https://github.com/derekparker/delve/wiki/Installation-on-OSX#1-create-a-self-signed-certificate
actually I did this:
cd $HOME/Library/Caches/Homebrew
tar xf delve-*.gz
go into directory ( mine is delve-1.0.0-rc.1 )
sh scripts/gencert.sh
it will asks for password, and you're done.
After that just re run brew install go-delve/delve/delve
and it will pass without problems
I did: go get -u github.com/derekparker/delve/cmd/dlv
Creating the dlv-cert.cfg and then running the commands described in https://github.com/go-delve/homebrew-delve/issues/19#issuecomment-325214701
and then adding the cert to the keychain as said in https://github.com/go-delve/homebrew-delve/issues/19#issuecomment-326151904 worked for me
The content of dlv-cert.cfg is
[ req ] default_bits = 2048 # RSA key size encrypt_key = no # Protect private key default_md = sha512 # MD to use prompt = no # Prompt for DN distinguished_name = codesign_dn # DN template [ codesign_dn ] commonName = "dlv-cert" [ codesign_reqext ] keyUsage = critical,digitalSignature extendedKeyUsage = critical,codeSigning
Then
openssl req -new -newkey rsa:2048 -x509 -days 3650 -nodes -config dlv-cert.cfg -extensions codesign_reqext -batch -out dlv-cert.cer -keyout dlv-cert.key
andsudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain dlv-cert.cer
Finally
sudo security import dlv-cert.key -A -k /Library/Keychains/System.keychain
I have this error too.
Trying to run openssl req -new -newkey rsa:2048 -x509 -days 3650 -nodes -config dlv-cert.cfg -extensions codesign_reqext -batch -out dlv-cert.cer -keyout dlv-cert.key
I get .
~ ❯❯❯ openssl req -new -newkey rsa:2048 -x509 -days 3650 -nodes -config dlv-cert.cfg -extensions codesign_reqext -batch -out dlv-cert.cer -keyout dlv-cert.key
error on line -1 of dlv-cert.cfg
38545:error:02001002:system library:fopen:No such file or directory:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-64.50.6/src/crypto/bio/bss_file.c:126:fopen('dlv-cert.cfg','rb')
38545:error:2006D080:BIO routines:BIO_new_file:no such file:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-64.50.6/src/crypto/bio/bss_file.c:129:
38545:error:0E078072:configuration file routines:DEF_LOAD:no such file:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-64.50.6/src/crypto/conf/conf_def.c:197:
Not sure what to do next. Am I missing a dep?
Run into the same issue.
Get the genscript.sh
from here:
https://github.com/derekparker/delve/blob/master/scripts/gencert.sh
Run it and then brew install go-delve/delve/delve
Youtube video tutorial: https://youtu.be/4K2bDLzYiAQ
@heraclitusq's solution worked for me on macOS 10.13.3 - thanks!
Calling the scripts/gencerts.sh script explained by @andreakappa works fine to get the formula installed.