coderazzi / aws_codeartifact_maven

Support to update AWS CodeArtifact credentials on maven IDEA projects.
MIT License
6 stars 6 forks source link

Default region not recognized #8

Closed raman-blyshchyk-vib closed 1 year ago

raman-blyshchyk-vib commented 1 year ago

When try to "Generate credentials" using some custom profile it doesn't recognize that region set in [default] profile from .aws/config file. Run "aws configure" doesn't fix issue. As workaround now can be set env variable AWS_DEFAULT_REGION, but is not very convenient.

coderazzi commented 1 year ago

Hi, are you using the default profile to generate the credentials, or other profile? I think that if you are using other profile, you need to do first aws configure --profile XXX Can you give it a try? Best

On Fri, Oct 21, 2022, 16:21 raman-blyshchyk-vib @.***> wrote:

When try to "Generate credentials" using some custom profile it doesn't recognize that region set in [default] profile from .aws/config file. Run "aws configure" doesn't fix issue. As workaround now can be set env variable AWS_DEFAULT_REGION, but is not very convenient.

— Reply to this email directly, view it on GitHub https://github.com/coderazzi/aws_codeartifact_maven/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH54IIMTRLFCBJZGKKMIWLWEKQN7ANCNFSM6AAAAAARLGZP2E . You are receiving this because you are subscribed to this thread.Message ID: @.***>

raman-blyshchyk-vib commented 1 year ago

Thank you, that worked! Yes, I was using other than default profile and I completely forgot to add profile to configure command. Maybe it is a good idea to add such hint to error message, what you think? Maybe it will save someone time :)

coderazzi commented 1 year ago

Hi, I can add some check on the error message and suggest indeed a solution, but it is not straightforward (if the profile is for a role, the aws configure has to be done against the underlying user profile, not the profile chosen by the user). But yes, the hint can be indeed valuable.

On Mon, Oct 24, 2022 at 8:11 AM raman-blyshchyk-vib < @.***> wrote:

Thank you, that worked! Yes, I was using other than default profile and I completely forgot to add profile to configure command. Maybe it is a good idea to add such hint to error message, what you think? Maybe it will save someone time :)

— Reply to this email directly, view it on GitHub https://github.com/coderazzi/aws_codeartifact_maven/issues/8#issuecomment-1288599773, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH54ILVV25AVBHUWT4XPWTWEZAB7ANCNFSM6AAAAAARLGZP2E . You are receiving this because you commented.Message ID: @.***>

coderazzi commented 1 year ago

Hi, I released a new version on the beta channel (2.2.0-beta) covering this issue. Could you give it a try?

raman-blyshchyk-vib commented 1 year ago

Sure, no problem, but for now last beta I see on plugins page https://plugins.jetbrains.com/plugin/16777-aws-codeartifact--maven/versions/beta is 2.1.1-beta

coderazzi commented 1 year ago

Yah, JetBrains it is still approving it, tomorrow should be visible.

On Mon, Oct 31, 2022 at 8:25 AM raman-blyshchyk-vib < @.***> wrote:

Sure, no problem, but for now last beta I see on plugins page https://plugins.jetbrains.com/plugin/16777-aws-codeartifact--maven/versions/beta is 2.1.1-beta

— Reply to this email directly, view it on GitHub https://github.com/coderazzi/aws_codeartifact_maven/issues/8#issuecomment-1296695722, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH54IO3TAZT62XTQXBL473WF5X7VANCNFSM6AAAAAARLGZP2E . You are receiving this because you commented.Message ID: @.***>

raman-blyshchyk-vib commented 1 year ago

Tested, works like a charm. One small detail, in message "aws configure --profile myProfileName " there is extra space after profile name. I checked that my profile names don't contain any extra whitespaces after.

coderazzi commented 1 year ago

Thanks for your time, Raman, I have removed that trailing space and released the plugin as version 2.2.0 on the stable channel.

There is a separate issue concerning regions ( https://github.com/coderazzi/aws_codeartifact_maven/issues/7), I will implement it in the following days.

On Wed, Nov 2, 2022 at 4:13 PM raman-blyshchyk-vib @.***> wrote:

Tested, works like a charm. One small detail, in message "aws configure --profile myProfileName " there is extra space after profile name. I checked that my profile names don't contain any extra whitespaces after.

— Reply to this email directly, view it on GitHub https://github.com/coderazzi/aws_codeartifact_maven/issues/8#issuecomment-1300641890, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH54IPUIIGIV7GUWNUJMSLWGKAJFANCNFSM6AAAAAARLGZP2E . You are receiving this because you commented.Message ID: @.***>