Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Updates to ssh key enablement for Cloud projects #8416

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions src/_includes/cloud/enable-ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,34 +38,23 @@ 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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄

- [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 [email protected]
```

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:

- 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)

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.

Expand Down Expand Up @@ -118,8 +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.

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**.

## Update Cloud environments with a new SSH key

After you add an SSH key, redeploy each active Cloud environment to upload the new key.

Use the [Magento Cloud CLI]({{site.baseurl}}/cloud/reference/cli-ref-topic.html) to redeploy the environment:

```bash
magento-cloud redeploy --project <project-name> --host <host-name> --environment <environment-name>
```

## Set global Git variables

Expand Down