deis / builder

Git server and application builder for Deis Workflow
https://deis.com
MIT License
40 stars 44 forks source link

My SSH key for push is not working #443

Closed miracle2k closed 7 years ago

miracle2k commented 7 years ago
$ git push deis
git@deis-builder.111.111.111.111.nip.io's password:

michael at risin in ~/project on master*
$ deis  keys:list
=== michael Keys
GitHub@miracle2k ssh-rsa AAAAB3Nz...@miracle2k
michael@risin    ssh-rsa AAAAB3Nz...hael@risin

Any suggestions has to how I can debug this? I can't figure out where the keys are stored, or which logs to check.

bacongobbler commented 7 years ago

did you add the key to your ssh agent? If it's not in your local SSH agent, SSH will not attempt to negotiate a handshake with it. ssh-add ~/.ssh/id_rsa

bacongobbler commented 7 years ago

ssh-add -l -E md5 will show you what public key fingerprints your agent is using when attempting handshakes.

miracle2k commented 7 years ago

I think my local setup should be alright. The key is used for servers, Github and so on and works fine.

When opening a SSH connection directly, I see this:

debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/michael/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply

So it seems the key is being attempted.

bacongobbler commented 7 years ago

Any logs from the builder? If it's failing to retrieve keys from the controller or failing to authenticate the key, it should report the issue.

miracle2k commented 7 years ago

So, trying again a few days later it started working; I got a message about the host key changing, so maybe the builder service restarted.

I'm pretty sure I checked the builder logs previously though and there was nothing.