Skip to main content

Onboarding Teams

SSH-Key​

Use SSH to avoid password prompts when you push code to your git provider.

info

The following example shows how to use ssh-key on BitBucket Cloud!

Change BitBucket settings with your git server (for example bitbucket.org become github.com)

Run the ssh-keygen command, and enter the full name of your key (for example /home/scott/.ssh/id_q01), and leave passphrase empty when requested.

$ ssh-keygen

Generating public/private rsa key pair.
Enter file in which to save the key (/home/scott/.ssh/id_rsa): /home/scott/.ssh/id_q01
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/scott/.ssh/id_q01
Your public key has been saved in /home/scott/.ssh/id_q01.pub
The key fingerprint is:
SHA256:yRtku0yVHgpoUmPuuNhPjTqW/KYI9euuoBCFWIcg39U scott@latitude
The key's randomart image is:
+---[RSA 3072]----+
|........ |
|..o*.+ E . |
| .o.= . o + |
| .. . * . |
| oo. S . |
| +oo o o + |
|+oo.+ . + |
|+o.+.. |
|o.+O* |
+----[SHA256]-----+

To ensure the correct SSH key is used when connecting to git server, update or create your SSH configuration file (~/.ssh/config) with the following settings

Host bitbucket.org
HostName bitbucket.org
User git
IdentityFile ~/.ssh/id_q01
IdentitiesOnly yes

To test that the SSH key was added successfully, open a terminal on your device and run the following command:

ssh -T git@bitbucket.org

If SSH can successfully connect with Bitbucket using your SSH keys, the command will produce output similar to:

authenticated via ssh key.

You can use git to connect to Bitbucket. Shell access is disabled

Provide Bitbucket Cloud with your public key.​

info

Please follow the instructions of your git server if is different from BitBucket Cloud.

To add an SSH key to your user account:

  • Select the Settings on the top navigation bar.
  • From the Settings dropdown menu, select Personal Bitbucket settings.
  • Under Security, select SSH keys.
  • Select Add key.
  • In the Add SSH key dialog, provide a Label to help you identify which key you are adding. For example, Work Laptop <Manufacturer> <Model>. A meaning full label will help you identify old or unwanted keys in the future.
  • Open the public SSH key file (public keys have the .pub file extension) in a text editor. The public key should be in the .ssh/ directory of your user (or home) directory. The contents will be similar to:

ssh-ed25529 LLoWYaPswHzVqQ7L7B07LzIJbntgmHqrE40t17nGXL71QX9IoFGKYoF5pJKUMvR+DZotTm user@example.com

Copy the contents of the public key file and paste the key into the Key field of the Add SSH key dialog.

  • Select Add key.
    • If the key is added successfully, the dialog will close and the key will be listed on the SSH keys page.
    • If you receive the error That SSH key is invalid, check that you copied the entire contents of the public key (.pub file).

Cluster Setup (optional step)​

In order to connect your cluster to the Q01 Platform console, there are some preparation steps that must be done.

Google Cloud Platform (GCP)​

Each user must have a valid permission to access the project, and gcloud installed on local machines.

Add IAM policy​

Go to the Identity and Access Management (IAM) of your GCP project, add users and assign at least the "Editor" role or use the gcloud cli command

gcloud projects add-iam-policy-binding PROJECT_ID --member='user:youraccount @gmail.com' --role='roles/editor'

Install the gcloud CLI​

Install Google Cloud CLI to create and manage Google Cloud resources and services directly on the command line or via scripts.

Before you begin

sudo apt-get update

Import the Google Cloud public key

curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg

Add the gcloud CLI distribution URI as a package source

echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
note

Make sure you don't have duplicate entries for the cloud-sdk repo in /etc/apt/sources.list.d/google-cloud-sdk.list.

Update and install the gcloud CLI

sudo apt-get update && sudo apt-get install google-cloud-cli

Run gcloud init to get started

gcloud init

Set the project in your shell

gcloud container clusters get-credentials CLUSTER_NAME --zone ZONE_ID --project PROJECT_ID

Install the auth plugin dependency

gcloud components install gke-gcloud-auth-plugin

Authorize gcloud to access the Cloud Platform with Google user credentials

gcloud auth login

and follow the instructions inside web browser.

Amazon Web Services (AWS)​

Not yet supported

Microsoft Azure​

Not yet supported


Installing Okteto CLI​

Install the Okteto CLI following these steps:

curl https://get.okteto.com -sSfL | sh

If you need a specific version you can set the OKTETO_VERSION environment variable:

curl https://get.okteto.com -sSfL | OKTETO_VERSION=2.3.3 sh

You can also install it via brew by running:

brew install okteto