Linux installs common troubleshooting for Git

Source: Internet
Author: User

FAQ


1:permission denied (Publickey,gssapi-keyex,gssapi-with-mic,password).

[[email protected] git]# git clone [email protected]:testone.git is cloning to ' testone ' ... [email protected] ' s password:permission denied (Publickey,gssapi-keyex,gssapi-with-mic,password). Fatal:could not Read from remote repository. Please make sure the correct access rightsand the repository exists.


Workaround:-C is the user name

[Email protected] git]# ssh-keygen-t rsa-c "git" [[email protected] git]# cat/root/.ssh/id_rsa.pub Ssh-rsa aaaab3nzac1y C2eaaaabiwaaaqeawhn+ejpkzy * * * ellipsis [[email protected] git]# cat/root/.ssh/id_rsa.pub >/home/git/.ssh/authorized_ Keys



2:fatal:the remote end hung up unexpectedly

FATAL:COULDN ' t find remote ref Master

Workaround:

[HTTP]

Postbuffer = 524288000



3: If you enter GIT push Origin master, you are prompted with an error message: error:failed to push som refs to ....

The solution is as follows:

    • 1. First enter the GIT pull Origin master//start the remote server github file down

    • 2. Then enter $ GIT push origin master

    • 3. If an error occurs FATAL:COULDN ' t find remote ref Master or fatal: ' Origin ' does not appear to be a git repository and fatal:could not Read from remote repository.

    • 4. You need to re-enter GIT remote add origin [email protected]:d Jqiang/gitdemo.git


4: A repository was created with Git init. git clone to another location, "receive.denycurrentbranch" configuration variable to ' refuse ' when using git push in Clone's repository. To Ip-addr:testone.git "

Command line $ git--bare init--shared


5:ERROR:SRC Refspec Master does not match any.

$ GIT push origin mastererror:src Refspec master does not match any.error:failed to push some refs to ' [email protected] : Testone/test.git '

The local repository is empty and cannot be submitted

Solutions

$ git Add hello//commit a file $ git commit-m "first commit"//Comment


6:remote:error:insufficient permission for adding a object to repository database./objects

Cause analysis: Because Test.git directory permission write failed

Remote:error:insufficient permission for adding a object to repository database./objectsremote:fatal:failed to write Objecterror:remote unpack failed:unpack-objects abnormal Exitto 192.168.9.19:testone/test.git! [Remote rejected] master, master (unpacker error) error:failed to push some refs to ' [email protected]:testone/test.g It


Workaround: Set the Test.git directory to the Git.git Master Group permission to upload successfully again


Linux installs common troubleshooting for Git

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.