Follow below Cloud Console Command steps to login in WSL Windows
Step [1] – Update Package Lists: Ensure your package lists are up to date
sudo apt update
Step [2] – Install Required Dependencies: Install PHP and other necessary dependencies:
sudo apt install php-cli php-curl php-zip unzip curl
Step [3] – Download and Install magento-cloud CLI: Use the following command to download and install the magento-cloud CLI
curl -sS https://accounts.magento.cloud/cli/installer | php
Step [4] – Add magento-cloud CLI to the PATH: Add the magento-cloud CLI to your PATH by editing your .bashrc or .zshrc file
echo 'export PATH="$HOME/.magento-cloud/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Step [5] – Verify The Magent Cloud: Run the following command to check if the installation was successful or check magento cloud version
magento-cloud --version
Step [6] – Verify The List of Available Commands: To verify that the magento-cloud command is available, you can view list of available commands
magento-cloud list
Step [7] – magento-cloud login, once this command run below output URL
http://127.0.0.1:5000
If this URL normally does not work, follow below steps to API Token Authentication command to login inside Adobe Commerce Console.
Step [7.1] – Generate API Token in Adobe Commerce Console.
Step [7.2] – Run below command API Token Authentication command to login
magento-cloud-cli auth:api-token-login
Step [7.3] – Once above command run asking for token/password , need to put below token (Already Generated API Token in Adobe Commerce Console) & successfully login Magento cloud CLI & ready to selection different integration
EFcMEi-K6p5Mq9poSkrvqX4gWNBP9ValEG3krC2eTyc , This Already Generated API Token in Adobe Commerce Console)
Step [7.4] – To verify either inside Adobe Commerce Cloud login successfully
magento--cloud version
Step [7.5] – How To Check Lists the environments in the current project
magento-cloud environment:list
Step [7.8] – How To Check, Lists variables in the current environment
magento-cloud variables