Tag Archives: Code cloud error

How to Solve Code cloud error: fatal: remote origin already exists

 1 Today, when submitting Git, I encountered a few problems, so I'll record them for future reference O(∩_∩)O
 2 
 3 The first problem
 4 
 5 git remote add origin**************
 6 fatal: remote origin already exists.
 7 
 8 After checking on the Internet, there are many white people who have encountered this problem, and the following is the solution extracted from the Internet.
 9 The solution is as follows.
10 1, first type git remote rm origin
11 2. Then type git remote add origin **************
12 
13 This will not report an error!
14 
15 Second problem
16 
17 git remote add origin******
18 The authenticity of host 'github.com ' can't be established
19 
20 This is because your git address is ssh, switch to https, or maybe your repository address is wrong, check it first with the command
21 git remote -v
22 
23 If it's not the same as your github address, go to your github and copy the repository address
24 Then in the terminal, type
25 git remote-set-url origin https://github.com/yourname/learngit.git (this is the address of your copied repository)
26 
27 And finally, just push!
28 git push origin master