-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUbuntu_Github.txt
More file actions
59 lines (46 loc) · 1.4 KB
/
Copy pathUbuntu_Github.txt
File metadata and controls
59 lines (46 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Sync Ubuntu to Github -Streamline codes
Install Git on Ubuntu, Open the ubuntu terminal and run this code
```bash
sudo apt install
sudo apt install git
```
Verify the installation by checking the Git Version
```bash
git --version
```
Configure Git with you GitHub credentials where you add your username and email address globally
```bash
git config --global user.name "Dygasy"
git config --global user.email "nurul.asyiqin@ntu.edu.sg"
Generate the SSH keys for secure access, this will create a new SSK key pair. Prompted to enter a file name (test1) and passphrase (**password**)
```bash
ssh-keygen -t rsa -b 4096 -C "nurul.asyiqin@ntu.edu.sg")
```
Add SSH key to the ssh-agent. This starts the SSH agent and adds your private key to it, so you dont need to enter the passphrase everytime you use Git
```bash
eval "$(ssh-agent -s)
ssh-add ~/test1
copy the public key to your clipboard
```bash
cat ~/test1.pub
```
they will provide the long winded output. Copy and then add the public key to you Github accounts under settings>SSH adn GPG keys.
Clone a repository from Github
```bash
git clone git@github.com:Dygasy/Metagenomics_V2
```
They will ask if we want to continue, type yes
```bash
cd Metagenomics_V2
```
Should we need to add a file in then
```bash
echo "write in the notes that you want" >hello.txt
```
```bash
git add hello.txt
```
```bash
git commit -m "added new notes and import a new file"
git push
```