Hello,
I have gotten a new machine and in the process of migrating my files and
everything to it, I got around to reinitialize my local Repo that's synced
with https://git.sr.ht/~chs/Emacs_Files and
https://git.sr.ht/~chs/Convert_Region
I've been trying to push changes to these repos once I had reinitialized my
own git repo locally but I ran into a problem as I could not apparently
authenticate properly to sr.ht via my ssh keys. So I got a new one, uploaded
it to sr.ht and thought the problem would disappear. It's still there. I've
been following the git set up doc on SourceHut though.
Running:
> git remote -v
gives me something which *I* interprete as being normal:
> origin git@git.sr.ht:~chs/ (fetch)> origin git@git.sr.ht:~chs/ (push)
However, running
> ssh git@git.sr.ht:~chs/
gives something else entirely:
> ssh: Could not resolve hostname git.sr.ht:~chs/: Name or service not known> Process /usr/bin/ssh exited abnormally with code 255
What am I doing wrong?
--
Charles-H. Schulz.
On Thu May 25, 2023 at 9:49 PM CEST, Charles-H. Schulz wrote:
> Hello,>> Running:> > git remote -v> gives me something which *I* interprete as being normal:> > origin git@git.sr.ht:~chs/ (fetch)> > origin git@git.sr.ht:~chs/ (push)
These should be followed by the repo:
$ git remote -v
origin git@git.sr.ht:~rjarry/aerc (fetch)
origin git@git.sr.ht:~rjarry/aerc (push)
copy git@git.sr.ht:~mpldr/aerc (fetch)
copy git@git.sr.ht:~mpldr/aerc (push)
> However, running> > ssh git@git.sr.ht:~chs/> gives something else entirely:> > ssh: Could not resolve hostname git.sr.ht:~chs/: Name or service not known> > Process /usr/bin/ssh exited abnormally with code 255
This is assuming : to be part of the hostname. SCP notation doesn't work
here. You should try logging in to git@git.sr.ht
--
Moritz Poldrack
https://moritz.sh
Le jeudi 25 mai 2023 à 22:14 +0200, Moritz Poldrack a écrit :
> On Thu May 25, 2023 at 9:49 PM CEST, Charles-H. Schulz wrote:> > Hello,> > > > Running:> > > git remote -v> > gives me something which *I* interprete as being normal:> > > origin git@git.sr.ht:~chs/ (fetch)> > > origin git@git.sr.ht:~chs/ (push)> > These should be followed by the repo:> $ git remote -v> origin git@git.sr.ht:~rjarry/aerc (fetch)> origin git@git.sr.ht:~rjarry/aerc (push)> copy git@git.sr.ht:~mpldr/aerc (fetch)> copy git@git.sr.ht:~mpldr/aerc (push)> > > However, running> > > ssh git@git.sr.ht:~chs/> > gives something else entirely:> > > ssh: Could not resolve hostname git.sr.ht:~chs/: Name or service> > > not known> > > Process /usr/bin/ssh exited abnormally with code 255> > This is assuming : to be part of the hostname. SCP notation doesn't> work> here. You should try logging in to git@git.sr.ht
It gave me the same outpy than with git@git.sr.ht:~chs :
> ssh: Could not resolve hostname git.sr.ht:~chs/: Name or service not> known> Process /usr/bin/ssh exited abnormally with code 255
Thank you,
--
Charles-H. Schulz
GPG: 7EA26B59B798B4E3
On Thu May 25, 2023 at 11:26 PM CEST, Charles-H. Schulz wrote:
> Le jeudi 25 mai 2023 à 22:14 +0200, Moritz Poldrack a écrit :> > This is assuming : to be part of the hostname. SCP notation doesn't> > work> > here. You should try logging in to git@git.sr.ht>> It gave me the same outpy than with git@git.sr.ht:~chs :>> > ssh: Could not resolve hostname git.sr.ht:~chs/: Name or service not> > known> > Process /usr/bin/ssh exited abnormally with code 255
For me it looks like this:
$ ssh git@git.sr.ht
PTY allocation request failed on channel 0
Hi mpldr! You've successfully authenticated, but I do not provide an interactive shell. Bye!
Connection to git.sr.ht closed.
Which is what is the expected behaviour. If this is different for you,
then that's noteworthy.
--
Moritz Poldrack
https://moritz.sh
Le jeudi 25 mai 2023 à 23:40 +0200, Moritz Poldrack a écrit :
> On Thu May 25, 2023 at 11:26 PM CEST, Charles-H. Schulz wrote:> > Le jeudi 25 mai 2023 à 22:14 +0200, Moritz Poldrack a écrit :> > > This is assuming : to be part of the hostname. SCP notation> > > doesn't> > > work> > > here. You should try logging in to git@git.sr.ht> > > > It gave me the same outpy than with git@git.sr.ht:~chs :> > > > > ssh: Could not resolve hostname git.sr.ht:~chs/: Name or service> > > not> > > known> > > Process /usr/bin/ssh exited abnormally with code 255> > For me it looks like this:> $ ssh git@git.sr.ht> PTY allocation request failed on channel 0> Hi mpldr! You've successfully authenticated, but I do not> provide an interactive shell. Bye!> Connection to git.sr.ht closed.> > Which is what is the expected behaviour. If this is different for> you,> then that's noteworthy.>
Indeed, I'm not getting your output at all, as I basically get an error
message. Where do I go from here I'm not sure as I don't really
understand what's going on. I'm googling around...
All the best,
--
Charles-H. Schulz
GPG: 7EA26B59B798B4E3
Hey there,
On Fri, May 26, 2023, at 10:35, Charles-H. Schulz wrote:
>> >You should try logging in to git@git.sr.ht>> > >> > It gave me the same outpy than with git@git.sr.ht:~chs :>> > >> > > ssh: Could not resolve hostname git.sr.ht:~chs/: Name or service>> > > not>> > > known>> > > Process /usr/bin/ssh exited abnormally with code 255>> >> For me it looks like this:>> $ ssh git@git.sr.ht>> PTY allocation request failed on channel 0>> Hi mpldr! You've successfully authenticated, but I do not>> provide an interactive shell. Bye!>> Connection to git.sr.ht closed.>> >> Which is what is the expected behaviour. If this is different for>> you,>> then that's noteworthy.
Here's a couple of interesting outputs:
$ ssh -vT git@git.sr.ht
OpenSSH_9.3p1, OpenSSL 3.0.8 7 Feb 2023
debug1: Reading configuration data /home/chs/.ssh/config
debug1: /home/chs/.ssh/config line 1: Applying options for *sr.ht
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to git.sr.ht [173.195.146.142] port 27.
debug1: Connection established.
debug1: identity file /home/chs/.ssh/srht.id_rsa type 0
debug1: identity file /home/chs/.ssh/srht.id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_9.1
debug1: compat_banner: match: OpenSSH_9.1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to git.sr.ht:22 as 'git'
debug1: load_hostkeys: fopen /home/chs/.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: sntrup761x25519-sha512@openssh.com
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com 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:WXXNZu0YyoE3RBl6qh4G4vF1vR0NeEPYJAiPME+P09g
debug1: load_hostkeys: fopen /home/chs/.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 'git.sr.ht' is known and matches the ED25519 host key.
debug1: Found key in /home/chs/.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: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities
debug1: Will attempt key: /home/chs/.ssh/srht.id_rsa RSA SHA256:Jq6QP5DyVGl/vHcDlf4GD96JugK5E8+pW1mR5VjFMbAQA explicit
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com>
debug1: kex_input_ext_info: publickey-hostbound@openssh.com=<0>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /home/chs/.ssh/srht.id_rsa RSA SHA256:Jq6QP5DyVGl/vHcDlf4GDGK5E8O+pW1mR5VjFMbAQA explicit
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: No more authentication methods to try.
git@git.sr.ht: Permission denied (publickey,keyboard-interactive).
---> I'm not getting much out of this, but why does it look for a known_hosts file outside of the regular known_hosts file in the home directory is not clear.
Then:
ssh -T git@git.sr.ht
git@git.sr.ht: Permission denied (publickey,keyboard-interactive).
So something's blocking, but I'm not sure on which side. sr.ht?
Help appreciated,
Charles Schulz.
On Fri May 26, 2023 at 10:58 PM CEST, Charles-H. Schulz wrote:
> ---> I'm not getting much out of this, but why does it look for a known_hosts file outside of the regular known_hosts file in the home directory is not clear.
To me this looks like your key hasn't been added to your account. And
the key under https://meta.sr.ht/~chs.keys looks a bit weird. Maybe try
removing it an adding it again
The other known_hosts it's checking are the system-wide known_hosts and
the *2 (alternatives), why the 2 are even a thing is beyond my knowledge.
--
Moritz Poldrack
https://moritz.sh
> the key under https://meta.sr.ht/~chs.keys looks a bit weird. Maybe try> removing it an adding it again
It looks like the ecdsa-sha2-nistp256 key has been moved on the previous
line. Is it possible that meta.sr.ht doesn't trim whitespace from the end of
the key a carriage return character was pasted by mistake?
I remember seeing something like that on the mailing list in the past
couple of months.
/Marius