Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: wondering if you have an example of mirroring to AWS code commit? #77

Closed
hanxuema opened this issue Jul 1, 2020 · 7 comments
Closed
Labels
question Further information is requested

Comments

@hanxuema
Copy link

hanxuema commented Jul 1, 2020

Q: wondering if you have an example of mirroring to AWS code commit?

@calebcartwright calebcartwright added the question Further information is requested label Jul 1, 2020
@calebcartwright
Copy link
Member

Hi @hanxuema, no can't say that we do. Are you asking out of curiosity or are you getting an error/failure with a destination target in code commit?

@houstonhaynes
Copy link

I'm going to jump into this because I'm also having some trouble connecting the dots. AWS CodeCommit generates a user/auth pair for accessing CodeCommit.

https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html

I don't see how the user/password pair relates to PAT

@calebcartwright
Copy link
Member

Thanks @houstonhaynes! There's obviously myriad git providers out there, and we really only had a few of the most popular ones available to us for testing. All of the systems we were working with readily supported (and recommended) access tokens as a means of authentication as opposed to username/password, hence the token references in our docs and in the Task input names.

Despite the input name, it's really just the authentication information so if a system you're mirroring from and/or to requires username/password instead of a token then you should just specify that value for the respective sourceGitRepositoryPersonalAccessToken and/or destinationGitRepositoryPersonalAccessToken with generated-username:generated-password (note the separator between user and pass).

A bit of related info can be found in #10

@houstonhaynes
Copy link

houstonhaynes commented Jul 4, 2020

Wow - was expecting this to be a message in a bottle to get picked up next week. :)

So I am only slightly ahead of the suggestions - and found that the construction of the user:pass is "confused" by the email

2020-07-04T00:37:21.4077044Z` fatal: unable to access 'https://soundfi.com-at-165111528094:***@git-codecommit.us-west-2.amazonaws.com/v1/repos/Hugo-Demo-Web-App/': URL using bad/illegal format or missing URL

The "soudfi.com" is predecated by myfirstname and @ which seems to be missing from the construct

Annotation 2020-07-03 180754

@houstonhaynes
Copy link

Update - switched to a process user I created for Amplify (which of course isn't a name based on an email pattern) and it worked a charm. All good here!

@calebcartwright
Copy link
Member

and it worked a charm. All good here!

Excellent!

The "soudfi.com" is predecated by myfirstname and @ which seems to be missing from the construct

I think you'd need to uri encode the first @ if the username portion has that symbol, as the auth info is currently provided the userinfo component of the uri. Guessing something like the below would work

houston%40soundfi.com-at-165111528094:password...

@hanxuema
Copy link
Author

hanxuema commented Jul 6, 2020

Hi, I figured out the way to connect to aws code commit

  1. you need to grant the HTTPS Git credentials for AWS CodeCommit
  2. use the access key and password. e.g:
    key:passowrd

thanks

@hanxuema hanxuema closed this as completed Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants