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

CLI raising error on email validation #25

Closed
abdalem opened this issue Nov 21, 2022 · 7 comments
Closed

CLI raising error on email validation #25

abdalem opened this issue Nov 21, 2022 · 7 comments
Labels
🐞 bug Something isn't working good first issue Good for newcomers

Comments

@abdalem
Copy link

abdalem commented Nov 21, 2022

HI. I have an issue about email validation when installing the new CLI. It raise an exception on my email that ending with .tech domain. The exception thrown is the following: >> this doesn't look like an email address

@maidul98
Copy link
Collaborator

Hello! I have updated the regex to be a bit more accurate when validating the email address.

For reference here is the code i pushed to update it: 3689d75

I have also pushed out a new release: https://github.com/Infisical/infisical/actions/runs/3514837815

Once the release is complete, you may reinstall or update the CLI in your package manager to receive the new change. Please let us know if you continue to have trouble.

@maidul98 maidul98 added 🐞 bug Something isn't working good first issue Good for newcomers labels Nov 21, 2022
@abdalem
Copy link
Author

abdalem commented Nov 22, 2022

Great ! The email regex is actually passing, but still having an issue for login: Unable to store your credentials in system key ring

I am using Ubuntu through WSL if that helps. WIth the old CLI (node), I had not any issue on login with the same platform.

EDIT
This is the logs i got:

ERRO[0009] Unable to store your credentials in system key ring
DEBU[0009] Unable to store user credentials:%!(EXTRA dbus.Error=The name org.freedesktop.secrets was not provided by any .service files)

@maidul98
Copy link
Collaborator

The Keyring is used to store your login credentials securely at rest. This must be because you are on a headless Linux on WSL where keyring may not be available. I'm going to work on reproducing this bug and seeing how we can get keyring on your Linux. I will get back to this shortly

@maidul98
Copy link
Collaborator

maidul98 commented Nov 22, 2022

I was able to reproduce the issue you mentioned. This is because you are on a headless linux (WSL). Here is my recommendation if you want to continue using WSL.

  1. Install the Keyring on WSL
sudo apt-get update -y

sudo apt-get install -y gnome-keyring
  1. install the CLI (i think you have done that already)

  2. start Keyring

export $(dbus-launch)
gnome-keyring-daemon -r --unlock --components=secrets

Note: The command gnome-keyring-daemon -r --unlock --components=secrets expects you to type your WSL password. Once you entered your password, press Ctrl+D twice.

  1. Login to infisical
infisical login 

Please keep in mind that you will have to run step 3 each time you open a terminal which did not already have the Keyring unlocked. Otherwise, you will get the same error. You do not have to login again after you successfully logged in once; you will just have to run step 3 in the terminal at least once before you run infisical.

Typically, all of this already exists on your system if you have a full linux/windows/mac so you don't have to do anything other than login into infisical. Let me know if this helps.

@abdalem
Copy link
Author

abdalem commented Nov 23, 2022

Ok ! Thanks ! I will try to find a solution to bypass this. Lot of people are using WSL now, including my whole teams.

EDIT 1
It really became annoying. With the old behavior (push-pull) it was far mor easy to setup envs, even in docker-compose. It make more sense in development environnement to act like this. Moreover, projects were working around Infisical but not becaming dependent of it. With the new logic, we have to edit our dockerfiles or docker-compose to make it work right. Maybe it is just the time to adapt myself to the new paradigm.

EDIT 2
I found out why it is working badly. It is the same behavior as pointed by my other issue: #26
But as I could not see the list of envs in a file, I was unable to reorder them.

@maidul98
Copy link
Collaborator

You can read more about Keyring here https://wiki.gnome.org/Projects/GnomeKeyring/RunningDaemon. To auto unlock, you can simply add

export $(dbus-launch) && echo "your wsl password" | gnome-keyring-daemon -r --unlock --components=secrets

to your ~/.bashrc. This will auto unlock your Keyring without having to type it in every time. I'm looking into your reordering issue.

@maidul98
Copy link
Collaborator

If you’ve had issues logging in because of keyring problems, Infisical CLI now supports multiple vaults to save your login credentials at rest. That means if the default store doesn’t work, you can switch to a different vault. Or, if you don’t have any vaults installed at all, you can still store your credentials safely in an encrypted text file with a passphrase that only you know. Check out more info on this here https://infisical.com/docs/cli/commands/vault don’t forget to update your CLI!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants