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

id_rsa key file does not exist after adding it? #39

Closed
Bobz-zg opened this issue Sep 7, 2020 · 3 comments
Closed

id_rsa key file does not exist after adding it? #39

Bobz-zg opened this issue Sep 7, 2020 · 3 comments

Comments

@Bobz-zg
Copy link

Bobz-zg commented Sep 7, 2020

Not really clear if I'm doing something wrong but I can't push to my remote because key does not exist.
I would expect that key is added to /home/runner/.ssh/id_rsa and then used from there, but that doesn't seam to be the case.
Any help appreciated, below is my output.

Adding keys:

Run webfactory/ssh-agent@v0.4.00s
4096 SHA256:Ogd8/KGgSFwKpL4mfmEZFBesrshP5P9SYSQzDBQMfHg (stdin) (RSA)
Run webfactory/ssh-agent@v0.4.0
  with:
    ssh-private-key: ***
Adding GitHub.com keys to /home/runner/.ssh/known_hosts
Starting ssh-agent
Adding private key to agent
Identity added: (stdin) ((stdin))
Keys added:
4096 SHA256:Ogd8/KGgSFwKpL4mfmEZFBesrshP5P9SYSQzDBQMfHg (stdin) (RSA)

Check if file exists in ~/.ssh/, not there..

Run ls -al  ~/.ssh/
total 12
drwxr-xr-x  2 runner docker 4096 Sep  7 10:05 .
drwxrwxrwx 11 runner docker 4096 Sep  7 10:05 ..
-rw-r--r--  1 runner docker  994 Sep  7 10:05 known_hosts

Check if file exists in /home/runner/.ssh/, not there..

Run ls -al /home/runner/.ssh/
total 12
drwxr-xr-x  2 runner docker 4096 Sep  7 10:05 .
drwxrwxrwx 11 runner docker 4096 Sep  7 10:05 ..
-rw-r--r--  1 runner docker  994 Sep  7 10:05 known_hosts

Runing git push host:branch

debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/runner/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/runner/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/runner/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/runner/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/runner/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/runner/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/runner/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/runner/.ssh/id_ed25519-cert type -1
@mpdude
Copy link
Member

mpdude commented Sep 7, 2020

This action is about starting ssh-agent, a background process that keeps your keys in memory and provides them to the ssh command whenever necessary. Your key files will never be written to disk, which is the whole point of running this.

@mpdude
Copy link
Member

mpdude commented Sep 7, 2020

Did you really run git push host:branch?

What happens if you try something like git push git@github.com:webfactory/ssh-agent.git instead?

@Bobz-zg
Copy link
Author

Bobz-zg commented Sep 8, 2020

Oh, that explains it, thank you. I'm using tmate session now to debug.
I managed to figure out what's wrong but did not finish setting up everything yet, I forgot to add my server fingerprint to known_hosts, but that was not visible in output.

@mpdude mpdude closed this as completed Sep 8, 2020
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

2 participants