Unable to successfully run git commands (i.e., git clone)

,

URL = ssh.dev.gitlab.citadel.ncsc.gov
OPENSSH = openssh.com
ssh -vvv -T git@URL

Results in:

OpenSSH_8.7p1, OpenSSL 3.0.7 1 Nov 2022
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: /etc/ssh/ssh_config line 63: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0
debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
debug2: checking match for ‘final all’ host URL originally URL
debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: not matched ‘final’
debug2: match not found
debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only)
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1-]
debug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1]
debug1: configuration requests final Match pass
debug1: re-parsing configuration
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: /etc/ssh/ssh_config line 63: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0
debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
debug2: checking match for ‘final all’ host URL originally URL
debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: matched ‘final’
debug2: match found
debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1-]
debug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1]
debug3: expanded UserKnownHostsFile ‘~/.ssh/known_hosts’ → ‘/home/keith/.ssh/known_hosts’
debug3: expanded UserKnownHostsFile ‘~/.ssh/known_hosts2’ → ‘/home/keith/.ssh/known_hosts2’
debug2: resolving “URL” port 22
debug3: ssh_connect_direct: entering
debug1: Connecting to URL [10.10.0.13] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: Connection established.
debug1: identity file /home/keith/.ssh/id_rsa type 0
debug1: identity file /home/keith/.ssh/id_rsa-cert type -1
debug1: identity file /home/keith/.ssh/id_dsa type -1
debug1: identity file /home/keith/.ssh/id_dsa-cert type -1
debug1: identity file /home/keith/.ssh/id_ecdsa type -1
debug1: identity file /home/keith/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/keith/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/keith/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/keith/.ssh/id_ed25519 type -1
debug1: identity file /home/keith/.ssh/id_ed25519-cert type -1
debug1: identity file /home/keith/.ssh/id_ed25519_sk type -1
debug1: identity file /home/keith/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/keith/.ssh/id_xmss type -1
debug1: identity file /home/keith/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: compat_banner: match: OpenSSH_7.4 pat OpenSSH_7.4* compat 0x04000006
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to URL:22 as ‘git’
debug3: record_hostkey: found key type ECDSA in file /home/keith/.ssh/known_hosts:2
debug3: load_hostkeys_file: loaded 1 keys from URL
debug1: load_hostkeys: fopen /home/keith/.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
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@OPENSSH,ecdsa-sha2-nistp256
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@OPENSSH,ecdsa-sha2-nistp256,ssh-ed25519-cert-v01@OPENSSH,ecdsa-sha2-nistp384-cert-v01@OPENSSH,ecdsa-sha2-nistp521-cert-v01@OPENSSH,sk-ssh-ed25519-cert-v01@OPENSSH,sk-ecdsa-sha2-nistp256-cert-v01@OPENSSH,rsa-sha2-512-cert-v01@OPENSSH,rsa-sha2-256-cert-v01@OPENSSH,ssh-rsa-cert-v01@OPENSSH,ssh-ed25519,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@OPENSSH,sk-ecdsa-sha2-nistp256@OPENSSH,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: aes256-gcm@OPENSSH,chacha20-poly1305@OPENSSH,aes256-ctr,aes256-cbc,aes128-gcm@OPENSSH,aes128-ctr,aes128-cbc
debug2: ciphers stoc: aes256-gcm@OPENSSH,chacha20-poly1305@OPENSSH,aes256-ctr,aes256-cbc,aes128-gcm@OPENSSH,aes128-ctr,aes128-cbc
debug2: MACs ctos: hmac-sha2-256-etm@OPENSSH,hmac-sha1-etm@OPENSSH,umac-128-etm@OPENSSH,hmac-sha2-512-etm@OPENSSH,hmac-sha2-256,hmac-sha1,umac-128@OPENSSH,hmac-sha2-512
debug2: MACs stoc: hmac-sha2-256-etm@OPENSSH,hmac-sha1-etm@OPENSSH,umac-128-etm@OPENSSH,hmac-sha2-512-etm@OPENSSH,hmac-sha2-256,hmac-sha1,umac-128@OPENSSH,hmac-sha2-512
debug2: compression ctos: none,zlib@OPENSSH,zlib
debug2: compression stoc: none,zlib@OPENSSH,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256
debug2: ciphers ctos: aes256-ctr,aes192-ctr,aes128-ctr
debug2: ciphers stoc: aes256-ctr,aes192-ctr,aes128-ctr
debug2: MACs ctos: hmac-sha2-256,hmac-sha2-512
debug2: MACs stoc: hmac-sha2-256,hmac-sha2-512
debug2: compression ctos: none,zlib@OPENSSH
debug2: compression stoc: none,zlib@OPENSSH
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: ecdh-sha2-nistp256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: aes256-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes256-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: ecdh-sha2-nistp256 need=32 dh_need=32
debug1: kex: ecdh-sha2-nistp256 need=32 dh_need=32
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:VTBYmsfeEeGaIyPsUJhu+004c/WVNMYkPoCYC0pN1RU
debug3: record_hostkey: found key type ECDSA in file /home/keith/.ssh/known_hosts:2
debug3: load_hostkeys_file: loaded 1 keys from URL
debug1: load_hostkeys: fopen /home/keith/.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 ‘URL’ is known and matches the ECDSA host key.
debug1: Found key in /home/keith/.ssh/known_hosts:2
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey out after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey in after 4294967296 blocks
debug1: Will attempt key: /home/keith/.ssh/id_rsa RSA SHA256:2/Y0+/Ecl3jV60BJk9ax0vGWOWTlmN2gXKrnc05xiYk agent
debug1: Will attempt key: /home/keith/.ssh/id_dsa
debug1: Will attempt key: /home/keith/.ssh/id_ecdsa
debug1: Will attempt key: /home/keith/.ssh/id_ecdsa_sk
debug1: Will attempt key: /home/keith/.ssh/id_ed25519
debug1: Will attempt key: /home/keith/.ssh/id_ed25519_sk
debug1: Will attempt key: /home/keith/.ssh/id_xmss
debug2: pubkey_prepare: done
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred gssapi-with-mic,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 public key: /home/keith/.ssh/id_rsa RSA SHA256:2/Y0+/Ecl3jV60BJk9ax0vGWOWTlmN2gXKrnc05xiYk agent
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/keith/.ssh/id_dsa
debug3: no such identity: /home/keith/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /home/keith/.ssh/id_ecdsa
debug3: no such identity: /home/keith/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /home/keith/.ssh/id_ecdsa_sk
debug3: no such identity: /home/keith/.ssh/id_ecdsa_sk: No such file or directory
debug1: Trying private key: /home/keith/.ssh/id_ed25519
debug3: no such identity: /home/keith/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: /home/keith/.ssh/id_ed25519_sk
debug3: no such identity: /home/keith/.ssh/id_ed25519_sk: No such file or directory
debug1: Trying private key: /home/keith/.ssh/id_xmss
debug3: no such identity: /home/keith/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
git@URL’s password:

Not enough information. Sending just debug logs and expecting an answer is somewhat short-sighted. If you wish for a reply with assistance explain in more detail exactly what you have been doing and what you have tried. For SSH to works requires uploading an SSH key to your Gitlab user profile for one thing.

But with the severe lack of information from your part it’s not possible to help further.

I have established a git server within an EC2 instances within our corporate account. Within that same account, under the same VPC, I created a “development” instance using Rocky 9. Using the appropriate pub/priv key combo, I can SSH into the Git instance from the development instance so I believe that confirms port 22 is not being blocked between the two. The pub key generated by ssh-keygen -t rsa -N “” -f $HOME/.ssh/gitlab was loaded into git on the gitlab instance.

Within sshd_config on the development machine, I’ve configured the following:
ChallengeResponseAuthentication no
GSSAPIAuthentication yes
GSSAPICleanupCredentials no
UsePAM yes
X11Forwarding yes

Within ssh_config, the only thing not commented out is:
Include /etc/ssh/ssh_config.d/*.conf

Within ssd_config.d:
50-redhat.conf

Within 50-redhat.conf:
Match final all
# Follow system-wide Crypto Policy, if defined:
Include /etc/crypto-policies/back-ends/openssh.config

    GSSAPIAuthentication yes
    ForwardX11Trusted yes

    SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
    SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
    SendEnv LC_IDENTIFICATION LC_ALL LANGUAGE
    SendEnv XMODIFIERS