From a7e877b77f6ad70163aa6212b7a3064dced26c7a Mon Sep 17 00:00:00 2001 From: Sathiya Prakash <50226394+sathiyaaa@users.noreply.github.com> Date: Fri, 18 Dec 2020 23:43:56 +0530 Subject: [PATCH 1/2] Added an additional method regarding adding a SSH key (#8379) * Added an additional method regarding adding a SSH key * Apply suggestions from code review Co-authored-by: Barny Shergold --- src/_includes/cloud/enable-ssh.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/_includes/cloud/enable-ssh.md b/src/_includes/cloud/enable-ssh.md index ce9206189a0..c226ba7d076 100644 --- a/src/_includes/cloud/enable-ssh.md +++ b/src/_includes/cloud/enable-ssh.md @@ -61,6 +61,7 @@ You can add SSH keys to your account in any of the following ways: - Using the [{{site.data.var.ece}} CLI](#add-key-cli) - Using the [{{site.data.var.ece}} Web Interface](#add-key-web) +- Using the [{{site.data.var.ece}} Cloud account Dashboard](#add-key-cloud) ### Add your SSH key using the CLI {#add-key-cli} @@ -121,6 +122,18 @@ To add an SSH key using the Project Web interface: {:.bs-callout-tip} You can view and manage the SSH keys on your account in _Account settings_. In the upper right corner of the Project Web interface, click **your-user-name** > **Account Settings**. +### Add a key using the Cloud Account Dashboard {#add-key-cloud} + +You will add your SSH public key to your Cloud account. + +1. Go to [https://accounts.magento.cloud](https://accounts.magento.cloud). +1. Click on 'Account Settings'. +1. Under SSH keys, click on 'Add a public key'. +1. Have another user on the project (with the Contributor role - at minimum) to redeploy each active environment you have access to. This will upload your SSH key to the environment. + +### Updating your SSH key +If you have added a new SSH key into your Cloud account, you will have to redeploy each active environment that you currently have access to - this will install/upload your new key to the environment. + ## Set global Git variables Set required global Git variables on the machine to commit or push to a Git branch. These variables set Git credentials for accessing your GitHub account. From d94504df89ef464614f939ded9e75e9de3c4c0b5 Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Wed, 23 Dec 2020 12:43:19 -0600 Subject: [PATCH 2/2] Updates based on review feedback - Replaced test SSH connection through GitHub instructions with link to GitHub documentation - Editorial revision and clean up --- src/_includes/cloud/enable-ssh.md | 43 ++++++++++++------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/src/_includes/cloud/enable-ssh.md b/src/_includes/cloud/enable-ssh.md index c226ba7d076..4deca85dc9b 100644 --- a/src/_includes/cloud/enable-ssh.md +++ b/src/_includes/cloud/enable-ssh.md @@ -38,23 +38,9 @@ If the directory does not exist or has no SSH key files, you must generate at le If you have at least one SSH key in your directory, add the key to your Magento and GitHub accounts: -- [Add an SSH key to your GitHub account](https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/) +- [Add an SSH key to your GitHub account](https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/) and [test the SSH connection](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/testing-your-ssh-connection). - [Add your public SSH key to your Magento account](#ssh-add-to-account) -### Test the SSH keys {#test} - -After adding the SSH keys, test the SSH connection to GitHub: - -1. In the terminal, enter the following command: - - ```bash - ssh -T git@github.com - ``` - -1. You may see a warning that the authenticity of the host can't be established followed by an RSA fingerprint. Enter `yes` to continue. - -1. If successful, you should receive a success message. If you receive a permission denied error, see [Error: Permission denied (publickey)](https://help.github.com/articles/error-permission-denied-publickey) troubleshooting on GitHub. - ## Add a public SSH key to your Magento account {#ssh-add-to-account} You can add SSH keys to your account in any of the following ways: @@ -63,10 +49,12 @@ You can add SSH keys to your account in any of the following ways: - Using the [{{site.data.var.ece}} Web Interface](#add-key-web) - Using the [{{site.data.var.ece}} Cloud account Dashboard](#add-key-cloud) +After you add a key, you must [redeploy active Cloud environments](#update-cloud-environments-with-a-new-ssh-key) to upload the key. + ### Add your SSH key using the CLI {#add-key-cli} {:.procedure} -To add an SSH key using the CLI: +To add an SSH key using the [Magento Cloud CLI]({{site.baseurl}}/cloud/reference/cli-ref-topic.html): 1. Open a terminal application on your local workstation. @@ -119,20 +107,23 @@ To add an SSH key using the Project Web interface: - Follow the prompts on your screen to complete the task. -{:.bs-callout-tip} -You can view and manage the SSH keys on your account in _Account settings_. In the upper right corner of the Project Web interface, click **your-user-name** > **Account Settings**. +### Add a key from the Cloud Account dashboard {#add-key-cloud} + +You can add your SSH public key directly from the Cloud _Account Settings_ page. -### Add a key using the Cloud Account Dashboard {#add-key-cloud} +1. Open your [Cloud account page](https://accounts.magento.cloud) and log in if required. +1. On the Cloud account dashboard, click the **Account Settings** tab. +1. Under _SSH keys_, click **Add a public key**. -You will add your SSH public key to your Cloud account. +## Update Cloud environments with a new SSH key -1. Go to [https://accounts.magento.cloud](https://accounts.magento.cloud). -1. Click on 'Account Settings'. -1. Under SSH keys, click on 'Add a public key'. -1. Have another user on the project (with the Contributor role - at minimum) to redeploy each active environment you have access to. This will upload your SSH key to the environment. +After you add an SSH key, redeploy each active Cloud environment to upload the new key. -### Updating your SSH key -If you have added a new SSH key into your Cloud account, you will have to redeploy each active environment that you currently have access to - this will install/upload your new key to the environment. +Use the [Magento Cloud CLI]({{site.baseurl}}/cloud/reference/cli-ref-topic.html) to redeploy the environment: + +```bash +magento-cloud redeploy --project --host --environment +``` ## Set global Git variables