Using the Nexus Lab ==================== A general introduction to the Nexus Lab environment can be found :doc:`here <../concepts/lab>`. Setting up SSH keys for Git repositories ---------------------------------------- If you are unable to clone the repository using the Git GUI in the Nexus Lab sidebar due to SSH authentication, you can follow the below instructions. 1. Create an SSH Key (`useful guide can be found here `_) 2. Register the public part of it to your Git server: - `GitHub instructions `_ - `GitLab instructions `_ 3. Make sure your git config is set up with your identity (you might need to restart the terminal to load the config): .. code-block:: bash git config --global user.email paul@dirac.com 4. Ensure SSH Agent is Running with: .. code-block:: bash eval "$(ssh-agent -s)" 5. Add your SSH key to the SSH agent: .. code-block:: bash ssh-add ~/.ssh/ 6. Set the correct permissions in your filesystem: .. code-block:: bash chmod 700 ~/.ssh & chmod 600 ~/.ssh/ 7. Try cloning the directory in the terminal: .. code-block:: bash git clone git@github.com:username/repository.git 8. You should then be able to navigate into the repository directory and use the Git GUI in the sidebar. .. note:: When you restart your jupyterhub pod, you may need to restart the ssh agent with: ``eval "$(ssh-agent -s)" && ssh-add ~/.ssh/``