When building a dev container on a remote server, accessing a remote server and cloning a project require authentication. The currently supported method of authentication is through the SSH keys. Password authentication is not yet supported, you can follow the related issue for the updates.
If you have password authentication, refer to the following procedure on how to generate a file with the SSH keys, forward it a remote server, and share your Git credentials.
Create and forward the SSH keys
Open the local terminal and generate the SSH keys with the following command:ssh-keygen
System generates the key-pair. By default, it will be stored in your
~is your home directory. The public key will be stored in the same location as the private key. It starts with the same name as the private key and have a
.pubsuffix. For example,
id_rsa.pub. If you need, you can change the key-pair location.
As a result, you have the SSH key-pair file on your local machine.
After the key-pair is generated, install the keys on a remote server with the following command:ssh-copy-id your_remote_server_name
The keys are added to the remote server, and you can build a dev container.
Connect to a remote server and clone a project into a dev container.
For more detailed information, refer to Dev Containers.
Make sure you are authenticated on GitHub. You can either use the SSH agent forwarding or simply log in to your GitHub account.
After the dev container environment is prepared, click Continue to open a project.