common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
1.06k stars 93 forks source link

Enter passphrase to unlock "~/.granted/secure-storage-aws-session-credentials" #532

Closed pjhavariotis closed 11 months ago

pjhavariotis commented 11 months ago

This is my first attempt to run Granted in WSL2 (Ubuntu 20.04.6 LTS). It seems that something is going wrong with the keyring. Every time I try to "assume" a profile the following message appears: ? Enter passphrase to unlock "~/.granted/secure-storage-aws-session-credentials" ************

Although the AWS credentials file is created, the following command proves that the named profile is not assumed!

aws sts get-caller-identity

Unable to locate credentials. You can configure credentials by running "aws configure".

I have installed the latest version of Granted!

~$ granted -v

  /$$$$$$                                 /$$                     /$$
 /$$__  $$                               | $$                    | $$
| $$  \__/  /$$$$$$  /$$$$$$  /$$$$$$$  /$$$$$$    /$$$$$$   /$$$$$$$
| $$ /$$$$ /$$__  $$|____  $$| $$__  $$|_  $$_/   /$$__  $$ /$$__  $$
| $$|_  $$| $$  \__/ /$$$$$$$| $$  \ $$  | $$    | $$$$$$$$| $$  | $$
| $$  \ $$| $$      /$$__  $$| $$  | $$  | $$ /$$| $$_____/| $$  | $$
|  $$$$$$/| $$     |  $$$$$$$| $$  | $$  |  $$$$/|  $$$$$$$|  $$$$$$$
 \______/ |__/      \_______/|__/  |__/   \___/   \_______/ \_______/

Version: 0.19.2
pjhavariotis commented 11 months ago

I followed the following recipe with pass https://docs.commonfate.io/granted/recipes/pass The passphrase is gone! However, it seems that the named profile is not assumed!

wjohnstondrip commented 11 months ago

If you are using Bash, could you double-check that you have alias assume="source /usr/local/bin/assume" in .bashrc or .bash_profile? That tends to be the problem when I see this. If you are using a different shell, or that's already there, then I'm not sure. You can run env | grep AWS_ after running assume to check that AWS_PROFILE is getting set.

pjhavariotis commented 11 months ago

You are right. The alias was missing. I added the aforementioned alias in a newly created .bash_aliases file. In order to avoid any surprises, it is safer to use this file than .bashrc.