aws / git-remote-codecommit

An implementation of Git Remote Helper that makes it easier to interact with AWS CodeCommit
Apache License 2.0
272 stars 39 forks source link

Allow "@" character in profile name #13

Open Tobotimus opened 4 years ago

Tobotimus commented 4 years ago

Hi,

I love the look of this tool and seems like a much more intuitive way to clone CodeCommit repositories than the previous !aws codecommit credential-helper $@ method.

However, right now my company can't adopt this tool since we generally always use the @ character in our profile names (role_name@account_name). Is it possible for this to be supported? Whether it be via escaping the @ with a backslash, or quoting the profile name, or some other design :)

Thanks! Toby

Tobotimus commented 4 years ago

If you'd like the design to be RFC 3986-compliant, you could say the profile ought to be percent-encoded, e.g. codecommit://role_name%40account_name@repo_name. I don't mind this. However this is technically a breaking change, since it would break many valid uses of the % character in a profile name.

Tobotimus commented 4 years ago

I've just had a thought: repo names cannot contain the @ character, whilst profile names can. Why don't we just split on the right-most @ character to separate the repo name from the profile name?

PR coming up.