我无法克隆aws codecommit存储库。我可以通过控制台浏览存储库,并使用适当的凭据。
GIT_SSH_COMMAND =“ssh -v”git clone ssh://git-codecommit.ap-south-1.amazonaws.com/v1/repo/myrepo my-repo的输出如下:
Cloning into 'my-repo'...
OpenSSH_6.6.1, OpenSSL 1.0.1k-fips 8 Jan 2015
debug1: Reading configuration data /home/ec2-user/.ssh/config
debug1: /home/ec2-user/.ssh/config line 2: Applying options for git-codecommit.*.amazonaws.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 56: Applying options for *
debug1: Connecting to git-codecommit.ap-south-1.amazonaws.com [52.95.88.???] port 22.
debug1: Connection established.
debug1: identity file /home/ec2-user/.ssh/ogdev.ppk type 1
debug1: identity file /home/ec2-user/.ssh/ogdev.ppk-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1
debug1: Remote protocol version 2.0, remote software version AWSCodeCommit VGh1LCAxMiBBcHIgMjAxOCAxNTozNTo0NCArMDAwMNf1UNJXOZTiyhCrnVuHnM7KIV3JCAKV4HC0cPMkB5lMrF
debug1: no match: AWSCodeCommit VGh1LCAxMiBBcHIgMjAxOCAxNTozNTo0NCArMDAwMNf1UNJXOZTiyhCrnVuHnM7KIV3JCAKV4HC0cPMkB5lMrFJGcDVDK05keFNhSitRdllFb1RadzZtS1p3Tlk1SWJ6ZVBieE9oTFQ2M1E9
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1 none
debug1: kex: client->server aes128-ctr hmac-sha1 none
debug1: kex: diffie-hellman-group-exchange-sha256 need=20 dh_need=20
debug1: kex: diffie-hellman-group-exchange-sha256 need=20 dh_need=20
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<7680<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA da:41:1e:07:3b:9e:76:a0:c5:1e:64:88:03:69:86:21
debug1: Host 'git-codecommit.ap-south-1.amazonaws.com' is known and matches the RSA host key.
debug1: Found key in /home/ec2-user/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/ec2-user/.ssh/ogdev.ppk
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
Authenticated to git-codecommit.ap-south-1.amazonaws.com ([52.95.88.149]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending command: git-upload-pack '/v1/repo/myrepo'
You have successfully authenticated over SSH. You can use Git to interact with AWS CodeCommit.
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
Connection to git-codecommit.ap-south-1.amazonaws.com closed by remote host.
Transferred: sent 3608, received 2048 bytes, in 0.0 seconds
Bytes per second: sent 889760.6, received 505052.6
debug1: Exit status -1
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
所有权限除创建/删除分支外;创建/删除存储库;更新DefaultBranch将分配给附加到用户角色的策略。
我已经完成了这个领域的所有现有问题。
有人可以帮忙解决这个问题吗?
TIA
答案 0 :(得分:0)
您提供的命令是&#34; GIT_SSH_COMMAND =&#34; ssh -v&#34; git clone https://git-codecommit.ap-south-1.amazonaws.com/v1/repo/myrepo my-repo&#34;正确的那一个?看来你正在使用http协议。你能确认端点是对的吗?您似乎正在尝试从ap-south-1克隆,它是否与您在控制台中检查的区域相同?