Aws codecommit can't push

I am setting up my new repo at aws codecommit. I am completely new to this.

I can clone my repo using this

git clone ssh://APKAISIJVIU6XXXXXX@git-codecommit.us-east-1.amazonaws.com/v1/repos/weewee my-demo-repo

      

However, when I try to push I get this message

Access denied (publication). fatal: Failed to read from remote storage.

I am setting up a config file and credentials as specified in AWS.

I cannot find what I am missing.

+2


source to share


1 answer


Do you have multiple public keys in the directory ~/.ssh

?

If you have id_rsa.pub

to ~/.ssh

, but you do not want to upload to the IAM console, you need to configure your .ssh/config

on the use of the public key that you have selected, the user name that you specify.

For example, if you created and uploaded a public key named codecommit_rsa.pub

(for each documentation), you would need to add the following lines to~/.ssh/config



Host git-codecommit. *. Amazonaws.com
  User APKAISIJVIU6XXXXXX
  IdentityFile ~ / .ssh / codecommit_rsa

Let me know if it helps!

Yilun

+2


source







All Articles