GitLabへのSSH
GitLabからgit cloneしたいのですが、そもそもSSHが繋がりません。
GitHabならよく使っていて流れ的に大差ないだろうと思っていたのですが・・。
権限はDeveloperです。
鍵に改行なども入っていなく、作り直しもしたのですがうまくいかず。
発生している問題・エラーメッセージ
ssh -vvvT git@gitlab.com で以下が表示されました。 OpenSSH_8.1p1, LibreSSL 2.7.3 debug1: Reading configuration data /Users/******/.ssh/config debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 47: Applying options for * debug1: Connecting to gitlab.com port 22. debug1: Connection established. ・ ・ ・ debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug1: kex: algorithm: curve25519-sha256@libssh.org debug1: kex: host key algorithm: ecdsa-sha2-nistp256 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 debug3: send packet: type 30 debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug3: receive packet: type 31 debug1: Server host key: ecdsa-sha2-nistp256 SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw debug3: hostkeys_foreach: reading file "/Users/*******/.ssh/known_hosts" debug3: record_hostkey: found key type ECDSA in file /Users/*******/.ssh/known_hosts:1 debug3: load_hostkeys: loaded 1 keys from gitlab.com debug3: hostkeys_foreach: reading file "/Users/*******/.ssh/known_hosts" debug3: record_hostkey: found key type ECDSA in file /Users/*******/.ssh/known_hosts:1 debug3: load_hostkeys: loaded 1 keys from 2606:4700:90:0:f22e:fbec:5bed:a9b9 debug1: Host 'gitlab.com' is known and matches the ECDSA host key. debug1: Found key in /Users/*******/.ssh/known_hosts:1 debug3: send packet: type 21 debug2: set_newkeys: mode 1 debug1: rekey out after 134217728 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 134217728 blocks debug1: Will attempt key: /Users/*******/.ssh/rsa_gitlab RSA SHA256:kTgturZywmb42GbC0M5uHUQFGJGuqA/cOyZG69d3FwM explicit agent 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 debug3: start over, passed a different list publickey 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 public key: /Users/*******/.ssh/rsa_gitlab RSA SHA256:kTgturZywmb42GbC0M5uHUQFGJGuqA/cOyZG69d3FwM explicit 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 debug2: we did not send a packet, disable method debug1: No more authentication methods to try. git@gitlab.com: Permission denied (publickey).
該当のソースコード
key path /.ssh/rsa_gitlab /.ssh/config --- Host gitlab.com User git HostName gitlab.com IdentityFile ~/.ssh/rsa_gitlab
試したこと
keyの生成&gitlabへ登録
権限を600にする
/.ssh/config作成
Gitのグローバル設定
gitlabで他アカウントを作り同じ鍵で試すと問題なく接続できました
先方が作成したアカウントがDeveloperだから接続できないのか
権限で制限しているのか・・作成したばかりのプロジェクトなので
まだリポジトリすらありません。それ故にcloneもできないのかと考え中です。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。