-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstallingGit.txt
76 lines (53 loc) · 2.8 KB
/
installingGit.txt
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-14-04#how-to-set-up-git
You can use the apt package management tools to update your local package index. Afterwards, you can download and install the program:
sudo apt-get update
sudo apt-get install git
Set Up Git:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
We can see all of the configuration items that have been set by typing:
git config --list
tno@BlockchainBeast:~/Downloads$ git config --global user.name "SebLKMa"
tno@BlockchainBeast:~/Downloads$ git config --global user.email "[email protected]"
tno@BlockchainBeast:~/Downloads$ git config --list
user.name=SebLKMa
tno@BlockchainBeast:~/Downloads$ which git
/usr/bin/git
GET LATEST TO EMPTY DIR
Go to local dir e.g. GoProjects
tno@BlockchainBeast:~/dev/GoProjects$ git init
Initialized empty Git repository in /home/tno/dev/GoProjects/.git/
tno@BlockchainBeast:~/dev/GoProjects$ git remote add origin https://github.com/SebLKMa/GoProjects.git
tno@BlockchainBeast:~/dev/GoProjects$ git fetch --all
Fetching origin
remote: Counting objects: 35, done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 35 (delta 3), reused 35 (delta 3), pack-reused 0
Unpacking objects: 100% (35/35), done.
From https://github.com/SebLKMa/GoProjects
* [new branch] master -> origin/master
tno@BlockchainBeast:~/dev/GoProjects$ git pull origin master
From https://github.com/SebLKMa/GoProjects
* branch master -> FETCH_HEAD
tno@BlockchainBeast:~/dev/GoProjects$ ls -l
total 4
drwxrwxr-x 3 tno tno 4096 Dec 12 16:09 hellobasic
WRONG USER and PASSWORD when using git push
===========================================
SEE
https://stackoverflow.com/questions/15381198/remove-credentials-from-git
https://nirklars.wordpress.com/tag/git-push-wrong-username/
C:\TNO\tnodevt\FIR>git push -u origin master
remote: Permission to sebtno/FIR.git denied to SebLKMa.
fatal: unable to access 'https://github.com/sebtno/FIR.git/': The requested URL returned error: 403
The following was the solution that finally worked satisfactory for me:
http://stackoverflow.com/questions/15381198/remove-credentials-from-git
Try this:
remove the [user] and [credential] entries from C:\Users\<username>\.gitconfig and
git config --system --unset credential.helper
or Try this:
git config --global credential.helper wincred
The command changes so that git uses windows own credential manager.
After this setting is changed try pushing once again, if it fails then remove the entries related to github in the windows Credential Manger in the Control Panel.
The next time you push it should now prompt you for login credentials AND REMEMBER THEM! phew