linux 安装git失败,Linux运维知识之linux下安装git常见故障整理
本文主要向大家介紹了Linux運維知識之linux下安裝git常見故障整理,通過具體的內容向大家展現,希望對大家學習Linux運維知識有所幫助。
FAQ1:?Permission?denied?(publickey,gssapi-keyex,gssapi-with-mic,password).[root@testss?git]#?git?clone?git@192.168.1.200:testone.git
正克隆到?'testone'...
git@192.168.1.200's?password:
Permission?denied?(publickey,gssapi-keyex,gssapi-with-mic,password).
fatal:?Could?not?read?from?remote?repository.
Please?make?sure?you?have?the?correct?access?rights
and?the?repository?exists.解決辦法:-C是用戶名[root@testss?git]#?ssh-keygen?-t?rsa?-C?"git"
[root@testss?git]#?cat?/root/.ssh/id_rsa.pub
ssh-rsa?AAAAB3NzaC1yc2EAAAABIwAAAQEAwhn+ejPkZY?***省略
[root@testss?git]#?cat?/root/.ssh/id_rsa.pub?>?/home/git/.ssh/authorized_keys2:?fatal:?The?remote?end?hung?up?unexpectedly???????fatal:?Couldn't?find?remote?ref?master解決辦法:如圖[http]postBuffer?=?5242880003:?如果輸入$?git?push?origin?master,提示出錯信息:error:failed?to?push?som?refs?to?.......????解決辦法如下:1、先輸入$?git?pull?origin?master?//先把遠程服務器github上面的文件拉下來2、再輸入$?git?push?origin?master3、如果出現報錯?fatal:?Couldn't?find?remote?ref?master或者fatal:?'origin'?does?not?appear?to?be?a?git?repository以及fatal:?Could?not?read?from?remote?repository.4、則需要重新輸入$?git?remote?add?origin?git@github.com:djqiang/gitdemo.git4:使用git?init創(chuàng)建了一個倉庫。再git?clone到其他位置,在clone的倉庫使用git?push的時候出現“receive.denyCurrentBranch'?configuration?variable?to?'refuse'.To?IP-ADDR?:testone.git”?????????//?命令行?$?git?--bare?init?--shared?????5:?error:?src?refspec?master?does?not?match?any.$?git?push?origin?master
error:?src?refspec?master?does?not?match?any.
error:?failed?to?push?some?refs?to?'git@192.168.9.19:testone/test.git'本地版本庫為空,不能提交解決辦法$?git?add?hello??//提交一個文件
$?git?commit?-m?"first?commit"????//注釋6:???remote:?error:?insufficient?permission?for?adding?an?object?to?repository?database?./objects????//?原因分析:?因為test.git?目錄權限寫入失敗remote:?error:?insufficient?permission?for?adding?an?object?to?repository?database?./objects
remote:?fatal:?failed?to?write?object
error:?remote?unpack?failed:?unpack-objects?abnormal?exit
To?192.168.9.19:testone/test.git
!?[remote?rejected]?master?->?master?(unpacker?error)
error:?failed?to?push?some?refs?to?'git@192.168.9.19:testone/test.git'//解決辦法:??將test.git目錄設置成git.git?屬主屬組權限?再次上傳成功
本文由職坐標整理并發(fā)布,希望對同學們有所幫助。了解更多詳情請關注系統(tǒng)運維Linux頻道!
總結
以上是生活随笔為你收集整理的linux 安装git失败,Linux运维知识之linux下安装git常见故障整理的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 锐速破解版一键脚本
- 下一篇: 数据结构课设:仓库管理系统(C++)