pixta-dev / repository-mirroring-action

A GitHub Action for mirroring a repository to another repository
https://github.com/marketplace/actions/mirroring-repository
MIT License
240 stars 82 forks source link

Mirroring to CodeCommit fails due to invalid file format #14

Closed ribice closed 2 years ago

ribice commented 2 years ago

Set up this action on a private repository in an organization. Added the following organization secrets:

CODECOMMIT_SSH_PRIVATE_KEY - SSH key from IAM console. CODECOMMIT_SSH_PRIVATE_KEY_ID - SSH Key ID from IAM console.

This is the error log I'm getting:

debug1: no match: AWSCodeCommit TW9uLCAxMCBKYW4gMjAyMiAxNzo1OToxOSArMDAwMDHevtTHzYh9LJq0+7OyPo2jDU2CoWI1jmByylPWLH0uD0xkSmFpYUJaV09KZzNNdldndGY0K2t2NFlPZnhQcCtSeitWUFV3endRV2c9
debug1: Authenticating to git-codecommit.us-east-2.amazonaws.com:22 as '***'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(2048<8192<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:3lBlW2g5xn/NA2Ck6dyeJIrQOWvn7n8UEs56fG6ZIzQ
Warning: Permanently added 'git-codecommit.us-east-2.amazonaws.com,52.95.20.253' (RSA) to the list of known hosts.
debug1: rekey out after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 4294967296 blocks
debug1: Will attempt key: /github/home/.ssh/id_rsa  explicit
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /github/home/.ssh/id_rsa
Load key "/github/home/.ssh/id_rsa": invalid format
debug1: No more authentication methods to try.
***@git-codecommit.us-east-2.amazonaws.com: Permission denied (publickey).
fatal: Could not read from remote repository.
yasaichi commented 2 years ago

@ribice Can you show me your workflow config?

Joshua-Enrico commented 2 years ago

Any solution ? havin same issue

yasaichi commented 2 years ago

@ribice

CODECOMMIT_SSH_PRIVATE_KEY - SSH key from IAM console.

The SSH key you can get from the IAM console is a public key. Could you try to specify the private key in ssh_private_key?

Joshua-Enrico commented 2 years ago

Find out that i create a shh key with a phrase, once i create another withoud phrase the error dissapears

yasaichi commented 2 years ago

Closed due to no replies for a long time.