victorskl / yawsso

Yet Another AWS SSO - sync up AWS CLI v2 SSO login session to legacy CLI v1 credentials
MIT License
302 stars 26 forks source link

can't get aws credentials in cmd line #78

Closed KetakiSharma closed 1 year ago

KetakiSharma commented 1 year ago

$ yawsso login --profile profile-name -e $Rai:NJF_NPPRFF_XRL_VQ="**" $Rai:NJF_FRPERG_NPPRFF_XRL="*" $Rai:NJF_FRFFVBA_GBXRA="***"

I don't understand why it's not providing AWS_ACCESS_KEY which it used to; this is the same output regardless of powershell or gitbash. However, credentials are generated and can see in .aws/credentials file and they do work but not able to see on cmd line.

I have tried uninstalling and installing back. I am running yawsso 1.0.1 the version

could someone please help.

Many thanks

victorskl commented 1 year ago

Ah. Since v1 onwards, you will need to decrypt the exported token.

echo 'Rai:NJF_NPPRFF_XRL_VQ=""' | yawsso decrypt
Env:AWS_ACCESS_KEY_ID=""

Then. Like so.

yawsso login --profile profile-name -e | yawsso decrypt

I reckon, pipe commands should work in PowerShell!

KetakiSharma commented 1 year ago

Thank you. It works now.