Tag Archives: git

Error: Host Key Verification Failed [How to Solve]

Delete the previous GitHub account information (including the deletion of the file under. SSH and the modification of user, name and user.email), reuse the new GitHub account to generate the public-private key, and then configure it into the settings of the new GitHub account. After that, an error is reported in the GIT clone project. Git error: host key verification failed

Open git bash

Enter the following commands in sequence to solve the problem

mkdir -p ~/.ssh
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
ssh-keygen -t rsa -C "user.email"

Reference: stackoverflow

jenkenis ERROR: Error fetching remote repo ‘origin‘ [How to Solve]


During the work, Jenkins made such a mistake in pulling gitlab as below:

jenkenis ERROR: Error fetching remote repo ‘origin‘


The pipeline command is as follows:

pipeline {
    agent any

  options {
      timeout(time: 2, unit: 'HOURS') 
    stages {
        stage('Fetch code') {
            steps {
                echo 'Hello World'
                checkout([$class: 'GitSCM', branches: [[name: '*/master']],
                doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', depth: 1, noTags: true, reference: '', shallow: true, timeout: 120]], 
				submoduleCfg: [],userRemoteConfigs: [[credentialsId: '49352c9d-3f03-4271-8b60-2fddab3ca058', url:
                '[email protected]']]])


cd to the specified directory under the corresponding workspace, such as workspace\test_pipelinescript here, and manually clone the project to the local through git clone. It should be noted here:

1. Delete the .git folder in the test_pipelinescript directory;

2. Copy everything in the test_jenkins directory to test_pipelinescript

3. Restart Jenkins service.

Enter services.msc through Win + R, find Jenkins service and stop –> Start

4. Re-trigger Jenkins to execute again, and it’s OK.

github Error: Logon failed, use ctrl+c to cancel basic credential prompt.

Logon failed, use ctrl+c to cancel basic credential prompt.

Today, when updating something on gitHub, the password is correct, and you can’t log in more than push. According to the prompt, you find that the previous configuration doesn’t work. The updated configuration is as follows:

set it in the individual

Check these

Generate a token and record it

Continue to push. Enter the password of the account when logging in for the first time, and enter the generated token for the second time

successfully push

[Solved] import cv2 Error: ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Execute the following command:

    import cv2
  File "/appletree/miniconda3/envs/yyp_pytorch/lib/python3.7/site-packages/cv2/__init__.py", line 5, in <module>
    from .cv2 import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Reason: libGL.so.1 is missing.
execute the following command after pip install opencv-python

pip install opencv-python-headless

[Solved] LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

There is an error when using git to pull the GitHub code base

LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

The solution is as follows:
1 Cancel global proxy first:

git config --global --unset https.proxy
git config --global --unset http.proxy

2. Configure global agent:

git config --global http.https://github.com.proxy socks5:// 
git config --global https.https://github.com.proxy socks5://

Note that 1080 is changed to the port number of its own proxy service

[Solved] error: Pulling is not possible because you have unmerged files


For the same repository, Jane and Flora each pulled code from the master branch of the repository.
Jane commits the modified code to the master branch first.
Flora then commits the modified code to the master branch, and finds that the remote repository master branch code has changed due to Jane’s commit, which prompts “Updates were rejected because the tip of your current branch is behind” when committing. branch is behind”

When Flora tried to pull the master branch code for merging, it prompted “error: Pulling is not possible because you have unmerged files”


git add -u 
git commit -m "xxxx" 
git pull
git push 

First, the file will be stored in the staging area and then commit the comments, and then git pull will not report an error
This kind of error is generally thought to have a conflict file, need to resolve the conflict or merge files, after the solution or merge need to recommit, not limited to pulling

[Solved] ERROR: commit 60acc70: missing Change-Id in message footer

When merging multiple commits, I accidentally deleted the Change-Id, resulting in push failure

remote: Processing changes: refs: 1        
remote: Processing changes: refs: 1, done            
remote: ERROR: commit 60acc70: missing Change-Id in message footer        
remote: Hint: to automatically insert a Change-Id, install the hook:        
remote:   gitdir=$(git rev-parse --git-dir); scp -p -P 29418 [email protected]:hooks/commit-msg ${gitdir}/hooks/        
remote: and then amend the commit:        
remote:   git commit --amend --no-edit        
remote: Finally, push your changes again        
error: failed to push some refs to 'ssh://[email protected]/project'


1. Use the amend option to generate a Change-Id:
If the missing Change-Id is the last (head) commit, use the following command to fix it:

$ git commit –amend
This command will open the default commit message editor, usually vi.

At this point, you don’t need to change anything, just save and exit (:wq).

If you check the git log again, you will see that the missing Change-Id has been filled in. Just git push again.

2. reset method
The reset command undoes your commit to the workspace, and you can recommit

If the missing Change-Id commit is the second commit in your git log, you can use the git reset command to roll back your local branch to that commit.

First, run git log, find the commit with the missing Change-Id, and copy its commit-id:

Find the second commit that is missing the Change-Id. Reset the code to that commit, and execute amend:

$ git reset 1a9096a34322885ac101175ddcac7dab4c52665d
$ git commit --amend

The next step is to recommit the code that was undone by git reset, and then push it:

$ git add ......
$ git commit -m "The log you Submitted"
$ git push review HEAD:refs /for/master

Reference link: https://blog.csdn.net/liuxu0703/article/details/54343096

vscode git error: would clobber existing tag [How to Solve]

Using vscode’s own git interface to operate pull, there may be an error about the tag would clobber existing tag, resulting in the inability to pull


1. Type git pull directly in terminal to finish pulling the code. Although the code is pulled, the vscode git tool still does not work.
2. Type git fetch –tags -f in terminal to force the local code tag to be updated first. Then use vscode’s git tools to pull the code.