secretive icon indicating copy to clipboard operation
secretive copied to clipboard

Secretive Agent not working

Open jorge-j1m opened this issue 2 years ago • 11 comments

I installed the App some time ago, and stopped using it, for some reasons. Since that I've changed terminals, reinstalled git and switched browsers several times.

After going to Help and Setup Secretive, the first screen of the modal does nothing, clicking install just gets you to the next step. I think I remember having to agree to some permissions, and install the agent itself.

I followed the uninstall and install steps from the FAQ several times. Reboot, all I could think of and it hasn't been of much help.

The Agent doesn't seem to be working, I've checked everything I can think of and I can't find what's wrong. I'm running MacOS Monterey 12.4.

Running the following commands yield the outputs below.

 $ ssh -Tv [email protected]:

OpenSSH_8.6p1, LibreSSL 3.3.6
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
debug1: /etc/ssh/ssh_config line 54: Applying options for *
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to github.com port 22.
debug1: Connection established.
debug1: identity file /Users/jorge/.ssh/id_rsa type -1
debug1: identity file /Users/jorge/.ssh/id_rsa-cert type -1
debug1: identity file /Users/jorge/.ssh/id_dsa type -1
debug1: identity file /Users/jorge/.ssh/id_dsa-cert type -1
debug1: identity file /Users/jorge/.ssh/id_ecdsa type -1
debug1: identity file /Users/jorge/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/jorge/.ssh/id_ecdsa_sk type -1
debug1: identity file /Users/jorge/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /Users/jorge/.ssh/id_ed25519 type -1
debug1: identity file /Users/jorge/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/jorge/.ssh/id_ed25519_sk type -1
debug1: identity file /Users/jorge/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /Users/jorge/.ssh/id_xmss type -1
debug1: identity file /Users/jorge/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.6
debug1: Remote protocol version 2.0, remote software version babeld-b9c2a189
debug1: compat_banner: no match: babeld-b9c2a189
debug1: Authenticating to github.com:22 as 'git'
debug1: load_hostkeys: fopen /Users/jorge/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU
debug1: load_hostkeys: fopen /Users/jorge/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host 'github.com' is known and matches the ED25519 host key.
debug1: Found key in /Users/jorge/.ssh/known_hosts:1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
debug1: Will attempt key: /Users/jorge/.ssh/id_rsa
debug1: Will attempt key: /Users/jorge/.ssh/id_dsa
debug1: Will attempt key: /Users/jorge/.ssh/id_ecdsa
debug1: Will attempt key: /Users/jorge/.ssh/id_ecdsa_sk
debug1: Will attempt key: /Users/jorge/.ssh/id_ed25519
debug1: Will attempt key: /Users/jorge/.ssh/id_ed25519_sk
debug1: Will attempt key: /Users/jorge/.ssh/id_xmss
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/jorge/.ssh/id_rsa
debug1: Trying private key: /Users/jorge/.ssh/id_dsa
debug1: Trying private key: /Users/jorge/.ssh/id_ecdsa
debug1: Trying private key: /Users/jorge/.ssh/id_ecdsa_sk
debug1: Trying private key: /Users/jorge/.ssh/id_ed25519
debug1: Trying private key: /Users/jorge/.ssh/id_ed25519_sk
debug1: Trying private key: /Users/jorge/.ssh/id_xmss
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey).

 $ ssh-add -A:

Error connecting to agent: No such file or directory

 $ echo $SSH_AUTH_SOCK:

/Users/xxxxx/Library/Contaiers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh

 $ ssh-agent:

SSH_AUTH_SOCK=/var/folders/4h/mf6fpjnj2dd5jr9563_j5gj40000gn/T//ssh-rieBHO4BotOC/agent.2979; export SSH_AUTH_SOCK;
SSH_AGENT_PID=2980; export SSH_AGENT_PID;
echo Agent pid 2980;

Any help would be appreciated, thanks! 🙏

jorge-j1m avatar Jul 21 '22 00:07 jorge-j1m

I think I remember having to agree to some permissions, and install the agent itself

Shouldn't have needed to (short of maybe macOS requesting your password when you moved to /Applications.

Looks like "containers" is misspelled here /Users/xxxxx/Library/Contaiers/com.maxgoedjen.Secretive.SecretAgent/Data - not sure if it's just the post that's wrong or your config. Recommend ls'ing the parent directory to see if it's valid.

Can you share what shell you're using? There's different instructions per shell in the setup workflow.

maxgoedjen avatar Jul 21 '22 04:07 maxgoedjen

I was using Secretive successfully until yesterday. Today, I updated to macOS 12.5, and it's not working. Don't know if it's related or not.

I'll add to this issue, but if you prefer I can file a separate issue

$ ssh -Tv [email protected]

OpenSSH_8.6p1, LibreSSL 3.3.6
debug1: Reading configuration data /Users/danielserodio/.ssh/config
debug1: /Users/danielserodio/.ssh/config line 17: Applying options for *
debug1: /Users/danielserodio/.ssh/config line 23: Deprecated option "useroaming"
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
debug1: /etc/ssh/ssh_config line 54: Applying options for *
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: auto-mux: Trying existing master
debug1: Control socket "/tmp/ssh_mux_github.com_22_git" does not exist
debug1: Connecting to github.com port 22.
debug1: Connection established.
debug1: identity file /Users/danielserodio/.ssh/id_rsa type -1
debug1: identity file /Users/danielserodio/.ssh/id_rsa-cert type -1
debug1: identity file /Users/danielserodio/.ssh/id_dsa type -1
debug1: identity file /Users/danielserodio/.ssh/id_dsa-cert type -1
debug1: identity file /Users/danielserodio/.ssh/id_ecdsa type -1
debug1: identity file /Users/danielserodio/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/danielserodio/.ssh/id_ecdsa_sk type -1
debug1: identity file /Users/danielserodio/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /Users/danielserodio/.ssh/id_ed25519 type -1
debug1: identity file /Users/danielserodio/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/danielserodio/.ssh/id_ed25519_sk type -1
debug1: identity file /Users/danielserodio/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /Users/danielserodio/.ssh/id_xmss type -1
debug1: identity file /Users/danielserodio/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.6
debug1: Remote protocol version 2.0, remote software version babeld-b9c2a189
debug1: compat_banner: no match: babeld-b9c2a189
debug1: Authenticating to github.com:22 as 'git'
debug1: load_hostkeys: fopen /Users/danielserodio/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: aes256-ctr MAC: hmac-sha2-512 compression: none
debug1: kex: client->server cipher: aes256-ctr MAC: hmac-sha2-512 compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU
debug1: load_hostkeys: fopen /Users/danielserodio/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host 'github.com' is known and matches the ED25519 host key.
debug1: Found key in /Users/danielserodio/.ssh/known_hosts:2
debug1: rekey out after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 4294967296 blocks
debug1: Will attempt key: /Users/danielserodio/.ssh/id_rsa 
debug1: Will attempt key: /Users/danielserodio/.ssh/id_dsa 
debug1: Will attempt key: /Users/danielserodio/.ssh/id_ecdsa 
debug1: Will attempt key: /Users/danielserodio/.ssh/id_ecdsa_sk 
debug1: Will attempt key: /Users/danielserodio/.ssh/id_ed25519 
debug1: Will attempt key: /Users/danielserodio/.ssh/id_ed25519_sk 
debug1: Will attempt key: /Users/danielserodio/.ssh/id_xmss 
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/danielserodio/.ssh/id_rsa
debug1: Trying private key: /Users/danielserodio/.ssh/id_dsa
debug1: Trying private key: /Users/danielserodio/.ssh/id_ecdsa
debug1: Trying private key: /Users/danielserodio/.ssh/id_ecdsa_sk
debug1: Trying private key: /Users/danielserodio/.ssh/id_ed25519
debug1: Trying private key: /Users/danielserodio/.ssh/id_ed25519_sk
debug1: Trying private key: /Users/danielserodio/.ssh/id_xmss
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey).

$ ssh-add -l

The agent has no identities.

$ echo $SSH_AUTH_SOCK

/Users/danielserodio/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh

$ ls -l $SSH_AUTH_SOCK

srwxr-xr-x 1 danielserodio staff 0 Jul 22 17:20 /Users/danielserodio/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh=

I'm running zsh, but I added the SSH_AUTH_SOCK definition to ~/.zshenv instead of ~/.zshrc to keep my complex dotfiles more organized.

Thanks!

dserodio avatar Jul 22 '22 20:07 dserodio

I also updated to 12.5 last night and now Secretive isn't working. :(

edit I did kill -HUP <pid> where <pid> is the process ID of the agent, and now things are working again, at least for now.

dhess avatar Jul 25 '22 14:07 dhess

+1 I just saw this after upgrading from 13.0 Beta 3 to Beta 4

zachberger avatar Jul 29 '22 03:07 zachberger

Did anyone fix this? Using SSH Config Editor Pro and having same issues.

vysecurity avatar Aug 10 '22 05:08 vysecurity

I didn't change anything, except for a reboot, and it's working fine again

dserodio avatar Aug 10 '22 12:08 dserodio

Experiencing this here too, installed latest macOS update (12.5.1). Post startup, Secretive wasn't loading it's keys. Noting @dserodio's mention that after another reboot it started working again, I decided to just stop/start the service (process is owned by me, so no sudo required). Back in business!

launchctl stop com.maxgoedjen.Secretive.SecretAgent
launchctl start com.maxgoedjen.Secretive.SecretAgent

I'd guess this has something going awry with starting the launchd service at startup/boot.

gogo-mmurphy avatar Aug 22 '22 17:08 gogo-mmurphy

After updating to 12.5.1 the problem returned, and restarting the service like @gogo-mmurphy suggested fixed it:

$ ssh-add -l
The agent has no identities.
$ launchctl stop com.maxgoedjen.Secretive.SecretAgent
$ launchctl start com.maxgoedjen.Secretive.SecretAgent
$ ssh-add -l
256 SHA256:3Pxbq/gyuGQKOCKqePXNcB9ULdT6G1vppg7gDBl47DY ecdsa-sha2-nistp256 (ECDSA)

dserodio avatar Aug 23 '22 14:08 dserodio

Same thing here when upgrading from 12.6 to 12.6.1. Restarting the service helped. Any pointers on how I could gather debug information if this happens on next upgrade @maxgoedjen?

kenkku avatar Oct 31 '22 15:10 kenkku

@dserodio I can confirm a similar issue and as soon as I added the ssh agent for Secretive it worked.

Thanks.

arnos avatar Dec 20 '22 14:12 arnos

I noticed when I was playing around with the newly released 2.4.0 that there are sometimes multiple copies of SecretAgent running. I assume this is not desired. Killing them and then restarting the app so only 1 is running seems to fix things at least temporarily.

image

luckman212 avatar Jan 08 '24 13:01 luckman212