sgidevnet / sgug-rse

Silicon Graphics User Group RPM Software Environment
GNU General Public License v3.0
62 stars 20 forks source link

git won't read RSA keys for remote work via ssh #54

Closed dillera closed 4 years ago

dillera commented 4 years ago

git has issues reading your RSA keys to perform remote operations via SSH. Probally related to the sshd issue with reading... keys.

dillera@challenge ~/code $ export GIT_TRACE=1
dillera@challenge ~/code $ GIT_SSH_COMMAND="ssh -vvv -i ~/.ssh/github_rsa -o 'IdentitiesOnly yes'" 
dillera@challenge ~/code $ git clone git@github.com:dillera/sgug-rpm-tools.git
15:23:45.955695 git.c:439               trace: built-in: git clone git@github.com:dillera/sgug-rpm-tools.git
Cloning into 'sgug-rpm-tools'...
15:23:46.017538 run-command.c:663       trace: run_command: unset GIT_DIR; ssh git@github.com 'git-upload-pack '\''dillera/sgug-rpm-tools.git'\'''
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
dillera@challenge ~/code $ 

Narrowing down- lets just try to validate SSH into github...

dillera@challenge ~/code $ ssh -T git@github.com
... bunch of stuff
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /usr/people/dillera/.ssh/id_rsa RSA SHA256:GwcrADxsvI1nN3EIG5O6Z42MBiDqtVX/Bb6VloKo8eU
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: /usr/people/dillera/.ssh/id_rsa RSA SHA256:GwcrADxsvI1nN3EIG5O6Z42MBiDqtVX/Bb6VloKo8eU
debug2: Load key "/usr/people/dillera/.ssh/id_rsa": Broken pipe
debug1: Trying private key: /usr/people/dillera/.ssh/id_dsa
debug1: Trying private key: /usr/people/dillera/.ssh/id_ecdsa
debug1: Trying private key: /usr/people/dillera/.ssh/id_ed25519
debug1: Trying private key: /usr/people/dillera/.ssh/id_xmss
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
git@github.com: Permission denied (publickey).

This should probally not be happening:

debug2: Load key "/usr/people/dillera/.ssh/id_rsa": Broken pipe

More to come.

danielhams commented 4 years ago

Fixed by a28ba4e23e3a8a89bb86aa03a1f5bfa374199076 I hope. Please give it a test.

dillera commented 4 years ago

Testing now, the spec file needs some tweaking as it didn't download the source. But we'll see what the fuel does for this git.

danielhams commented 4 years ago

0.0.6 is out and this fix is in there.