{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Git Lesson" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "SWC Git Lessons:\n", "http://swcarpentry.github.io/git-novice/\n", "\n", "\n", "Create a project in GitLab:\n", "https://docs.gitlab.com/ee/gitlab-basics/create-project.html\n", "\n", "\n", "Generating a new SSH key pair in GitLab:\n", "https://docs.gitlab.com/ee/ssh/README.html#generating-a-new-ssh-key-pair" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To generate an SSH key run the following command in the Jupyter terminal replacing *MY_NAME* with your name\n", "```\n", "ssh-keygen -t ed25519 -C \"MY_NAME@hts2019\" -f /home/jovyan/work/.HTSgitlab.key\n", "```\n", "Once you have done that you should be able to run the following to get the public key, then you can add this public key to your GitLab account by doing the following:\n", "1. Select and copy the public key from below\n", "2. Click your avatar in the upper right corner and select Settings. \n", "3. From there navigate to SSH Keys and paste your public key in the “Key” section. The comment (*MY_NAME@hts2019*) should appear under “Title”. If not, give your key an identifiable title\n", "4. click Add key.\n", "\n" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKcySbh4K/+HUL04t8aL2olu2XXjkA/8vv0XUyDQ6CF7 josh@hts2019\n" ] } ], "source": [ "cat /home/jovyan/work/.HTSgitlab.key.pub" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Fork a Repo in Gitlab\n", "Fork a repo in GitLab:\n", "https://docs.gitlab.com/ee/gitlab-basics/fork-project.html\n", "\n", "Mirror a repo in Gitlab \n", "https://docs.gitlab.com/ee/workflow/repository_mirroring.html\n", "\n", "\n", "HTS Course repo is https://gitlab.oit.duke.edu/hts2019/hts2019-notebooks\n", "\n" ] } ], "metadata": { "kernelspec": { "display_name": "Bash", "language": "bash", "name": "bash" }, "language_info": { "codemirror_mode": "shell", "file_extension": ".sh", "mimetype": "text/x-sh", "name": "bash" } }, "nbformat": 4, "nbformat_minor": 2 }