Tag Archives: git

git clone Error: “server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLf…

I can use ssh by cloning the project, but it doesn’t work when I clone the project with https. it displays the following message error.

server certificate verification failed. cafile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

HR Solutions :

Open the terminal and run the following command:

export GIT_SSL_NO_VERIFY=1

git push error failed to push some refs to solution

Problem specification
When we found a problem in the Github repository, you changed it online on Github; Or you can just add a README file or something to a library on Github without synchronizing it. Push fails when you have a commit again to commit from the local library to the remote Github library.

I edited a file online in github library, and it was not synchronized to the local library. After that, I added the file test.txt in the local library and tried to submit it to github, but the following error occurred: error: failed to push some refs to.

A statement in advance
For the code lost in the comments, it should be emphasized again that the base should be used with caution, and the branch should be determined before operation. In this case, the master branch is taken as an example, and the loss of the code caused by the wrong branch should be taken as the consequence.
The solution
The problem is that the remote library is inconsistent with the local library, so we can just synchronize the remote library to the local library. Note: I use the master branch here, please change the branch according to your own development branch.

git pull --rebase origin master

This directive merges updates from the remote library into the local library – the rebase function is to cancel the commit from the local library and connect them to the updated version library.


The following is a graphical explanation of the occurrence and resolution of the error situation

git pull –rebase origin master means to cancel commit records, temporarily save them as patches (in the “.git/rebase” directory), synchronize the remote repository to the local repository, and finally merge the patches into the local repository.

will then be able to push the local library into the remote library.

Under Linux, git cannot be used, prompt sign_and_send_pubkey: signing failed: agent refused operation

Under Linux, Git cannot be used if the server has already added a public key
Git Clone and other functions cannot be used under Linux. Prompt:

sign_and_send_pubkey: signing failed: agent refused operation

In turn (if no public key is added) :

ssh-add
eval $(ssh-agent -s)

Execute (public key has been added) :

eval $(ssh-agent -s)

Eval $(sSH-Agent-s) system runs at startup
Obviously, the above method requires executing eval $(sSH-agent-s) before using Git for the first time. Otherwise, it is not friendly to use an error. We want to avoid the trouble of eval $(ssh-agent-s) once and for all, which is unlikely to be remembered. Therefore, I need to initialize this command when the system boot, help me to execute this command.
Current user (if you prefer “any configuration is for users”)
modify ~/.bashrc, vim ~/.bashrc
add this line (suggested at the end) :

# 启动 ssh-agent,“> .null”是为了解决在终端喊一嗓子的问题(其实就是将它输出到一个.null文件中去了)
eval $(ssh-agent) > .null

All users (recommended)
modify (may need sudo, add it yourself as necessary) /etc/bashrc, vim /etc/bashrc
add this line (it is recommended to add it at the end) :

# 启动 ssh-agent,“> .null”是为了解决在终端喊一嗓子的问题(其实就是将它输出到一个.null文件中去了)
eval $(ssh-agent) > .null

Error in Git clone or pod install: smudge filter LFS failed clone succeeded, but checkout failed

encountered the following problem when git clone :

git-lfs smudge '第三方库某个文件': git-lfs: command not found
error: external filter 'git-lfs smudge %f' failed 127
error: external filter 'git-lfs smudge %f' failed
fatal: 第三方库某个文件: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

basically means that a file is too large to be checked out.

solve :
execute command :brew install git-lfs

reason :
git-lfs solves the problem that a single file is too big, specific can be below baidu.

error: src refspec master does not match any error:failed to push some refs to ‘[email protected]:xxxx

once you have a local repository you need to set up a github repository and have both repositories remotely synchronized, the first time you synchronize your code remotely

occurs

git push-u origin master has problems:

error: src refspec master does not match any
error: failed to push some refs to '[email protected]:xxxxxxxx/xxx.git'

cause:

1. If the readme.md is not checked when the remote warehouse is created: commit to the remote library without any content in the staging area. If the empty staging area cannot be committed, add and commit

are required at least once

2. If the readme.md file on github is not in the local directory

resolved:

if question 1:

git add .

git commit -m “commit all local code to origin”

git push -u origin master

if question 2:

Git pull –rebase origin master

this is where you can see the local readme.md file

and now you can do git push-u origin master

Error: SRC refspec master does not match any. error: failed to push some refs to

after being associated with the remote warehouse,

when we push the file from the local warehouse to the online warehouse through the push command

has the following error

error: src refspec master does not match any.

error: failed to push some refs to

common cause:

1. The local git repository directory is empty

2. Local warehouse add not commit

3. Git init error

use the command git add + file name , add the file to the repository, and then push normally.

here are some of the errors I made while operating.

****************************************************************************************

when add HTML files in a double 叒 error

and then use git status to check the file status, found that the three files are still associated with the remote warehouse SSH file, the original file path is wrong,

and then switch the path, git add file, push file to finally submit the local warehouse to the online warehouse

Git error: unlink of file failed.Should I try again?

Error

occurs when git switches branches

Unlink of file ‘XXX’ failed.Should I try again?

at first thought that something had forgotten commit, but after this error occurred several times, it became clear that it wasn’t easy.

the reason is that you have some files in your working directory that are being used by a program, which is probably Idea,VS or eclipse, but it could also be another program

The

solution is not simply to choose y or n, but to close the IDE and let the IDE release the files.

can also be used in conjunction with Process Explorer on Windows to query which programs are using the file.

https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer

if you switch back to the original branch, use git status to check for uncommitted files, then you can use

git checkout -- *

the above command restores all these corrupted files to the last commit.

Failed connect to github.com:443 ; no error and the remote end hung up unexpectedly

while using git in combination with github to submit code to github today, an error was reported as follows:

1: Push failed: failed with error: unable to access “https://github.com/cmshome/HelloWorld.git/” : failed connect to github.com: 443; No error
2: Push failed
failed with The error: The remote end hung up unexpectedly
The remote end hung up unexpectedly
RPC failed; result=7, HTTP code = 0

ouch, a random search on the Internet, it is the need to set up what git proxy, but there is no actual screenshot of what, you can refer to.

and luckily, we’re done. Write down solutions to problems.

first look at the following two pictures:

, this graph is the log of all the errors. At the beginning, I kept pushing, but at the end, it was a success.

so let’s see what version of git is in my local computer. Details are shown in the figure above.

when I installed it on my computer, there were two ICONS:

is the same as your question. The key to viewing the above version and solving the problem has to do with “git shell”.

:

:

and then, this line of command, post, as follows, for friends who encounter the same problem to use:

git config –global http.proxy “localhost:1080”

is the command that saved me from fire and water and helped me a lot.

there is a prerequisite:

because, my own computer USES over the wall tools, is to have their own VPN, and is turned on. For details on which VPN tool I’m using, see the icon below:

, I don’t know, will not over the wall after setting this, will also be perfect to solve the problem?

below is the link to version control of the project that I practiced on Windows in conjunction with IntelliJ IDEA 2017.1 x64 editor:

win 7 64 bit IntelliJ IDEA details how to use GitHub(git) for project version control and management

article has my cloud disk share of the tools I used to implement this version management function at the time.

think this article useful, don’t bother, just point a like, if dislike trouble, also trouble point a like, if really don’t want thumb up, it is not can not.
but if you want to put your foot on it, get out of here, here, here.

watch out for my 30-meter broadsword. Hem. Think of all afraid!!

Git bash Error: Could not fork child process: There are no available terminals (-1)

Error:
Error: Could not fork child process: There are no available terminals (-1)

:

solution :

(1) use the CMD command tasklist to find git bash’s process

(2) find the red marker

(3) execute the command (taskkill /pid 9872-t-f ) to kill it can be

reference problem resolution link :
Git bash Error: Could not fork child process: There are no available terminals (-1)

reproduced in: https://www.cnblogs.com/youcong/p/11032831.html

Rsync: failed to exec SSH: no such error in remote Rsync

1. Transfer the file /etc/hosts to 10.41.1.77/MNT /
[root@backup ~]# rsync-avz /etc/hostess-p 22′ [email protected]:/ MNT /
rsync: Failed to exec SSH No to the file or directory (2)
rsync error: error in the IPC code (code 14) at pipe. C (84) [sender = 3.0.6]
rsync: connection unexpectedly closed (0 bytes received so far) (sender)
rsync error: Error in IPC code (code 14) at io.c(600) [sender=3.0.6]
### # check the reason is that SSH client has not been installed ### # br>[root-backup MNT]# yum install openssh-counts-y
[root-@backup MNT]# rsync avz /etc/hosts-p 22′ [email protected]:/MNT/
The authenticity of host ‘10.41.1.77 (10.41.1.77)’ can ‘t be established.
RSA key fingerprint is: 85 4 f: when d: 41: e2: fb: eb: 88: e2: ba: ce: 4 e: 5 a: 49: c4.
Are you sure you want to continue connecting (yes/no)?Yes
Warning: Permanently added ‘10.41.1.77’ (RSA) to the list of known hosts.
[email protected]’s password:
bash: rsync: command not found: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: Remote command not found (code 127) at IO. C (600) [sender=3.0.6]
[root-@backup MNT]# rrm-qa rsync
rsync 3.0.6-12. El6.x86_64
prompt bash: rsync: Rsync program
client installer
[root-@nfs01 MNT]# yum install rsync-y
retransmit
[root-@backup MNT]# rsync-avz /etc/hosts-ssh-p 22′ [email protected]:/ MNT /
[email protected]’s password:
sending incremental file list
hosts

sent 196 bytes received 31 bytes 41.27 bytes/ SEC
total size is 309 speedup is 1.36
target computer check to see if the transmission was successful
[root@nfs01 MNT]# ls
hosts
chuan successfully

reproduced in: https://blog.51cto.com/11956937/2067602