简体   繁体   English

AWS CodeCommit-无法克隆存储库(SSH)

[英]AWS CodeCommit - Can't clone repository (SSH)

I'm unable to clone aws codecommit repository. 我无法克隆AWS Codecommit存储库。 I'm able to browse the repository via console, with appropriate credentials. 我可以使用适当的凭据通过控制台浏览存储库。

The output of GIT_SSH_COMMAND="ssh -v" git clone ssh://git-codecommit.ap-south-1.amazonaws.com/v1/repo/myrepo my-repo as below: 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.

All privileges except Create/ Delete Branch; 创建/删除分支外的所有特权; Create/Delete Repository; 创建/删除存储库; Update DefaultBranch are assigned to the policy that's attached to the user's role. 更新DefaultBranch被分配给附加到用户角色的策略。

I have gone through all existing questions in this area. 我已经解决了该领域中所有现有的问题。

Could anyone help resolving this issue? 谁能解决这个问题?

TIA TIA

Is the command you provided "GIT_SSH_COMMAND="ssh -v" git clone https://git-codecommit.ap-south-1.amazonaws.com/v1/repo/myrepo my-repo " the right one? 您提供的命令“ GIT_SSH_COMMAND =“ ssh -v” git clone https://git-codecommit.ap-south-1.amazonaws.com/v1/repo/myrepo my-repo是正确的吗? it seems you are using http protocol. 看来您使用的是http协议。 Can you confirm the endpoint is right? 您可以确认端点正确吗? It seems you are trying to clone from ap-south-1, is it the same region as you are checking in the console? 似乎您正在尝试从ap-south-1进行克隆,是否与您在控制台中检查的区域相同?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM