linux git reposi,关于linux:GitLab:无法从远程存储库读取
我創(chuàng)建了項(xiàng)目并添加了ssh-key(都通過(guò)webinterface),但是當(dāng)我嘗試向存儲(chǔ)庫(kù)中推送內(nèi)容時(shí),出現(xiàn)此錯(cuò)誤:"無(wú)法從存儲(chǔ)庫(kù)讀取"。 這可能是由于以下事實(shí):.git-project-file在/ home / git / repositories / [group] /文件夾中不存在。
gitlab-check返回:
[Group] / [Project] ... can't create, repository is empty
推送到存儲(chǔ)庫(kù)時(shí)出錯(cuò)
git remote add origin git@myserver.com:[group] / [project] .git
git push -u原始主機(jī)
fatal: '/home/git/repositories/[group]/[project].git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
是什么引起了錯(cuò)誤
ls -ld /home/git/repositories/[group]/[project].git
File not found.
為什么未創(chuàng)建文件?
有關(guān)我的設(shè)置的信息
ls -ld / home / / home / git /
drwxr-xr-x 3 root root 4096 Aug 28 15:04 /home/
drwxr-xr-x 8 git ?git ?4096 Aug 31 11:33 /home/git/
ll / home / git
drwxr-xr-x ?8 git ?git ?4096 Aug 31 11:33 ./
drwxr-xr-x ?3 root root 4096 Aug 28 15:04 ../
-rw-r--r-- ?1 git ?git ? 220 Aug 28 15:04 .bash_logout
-rw-r--r-- ?1 git ?git ?3637 Aug 28 15:04 .bashrc
drwx------ ?2 git ?git ?4096 Aug 29 19:52 .cache/
-rw-r--r-- ?1 git ?git ? ?88 Aug 31 11:33 .gitconfig
drwxr-xr-x 16 git ?git ?4096 Aug 29 15:32 gitlab/
drwxr-xr-x ?2 git ?git ?4096 Aug 28 15:09 gitlab-satellites/
drwxr-xr-x ?8 git ?git ?4096 Aug 29 19:51 gitlab-shell/
-rw------- ?1 git ?git ? ?13 Aug 29 15:36 .mysql_history
-rw-r--r-- ?1 git ?git ? 675 Aug 28 15:04 .profile
drwxrws--- ?5 git ?git ?4096 Aug 29 16:15 repositories/
drwx------ ?2 git ?git ?4096 Aug 31 11:47 .ssh/
-rw------- ?1 git ?git ?3453 Aug 29 16:03 .viminfo
sudo -u git -H捆綁執(zhí)行rake gitlab:env:info
RAILS_ENV=production
System information
System: ? ? Ubuntu 13.04
Current User: ? git
Using RVM: ?no
Ruby Version: ? 2.0.0p247
Gem Version: ? ?2.0.3
Bundler Version:1.3.5
Rake Version: ? 10.1.0
GitLab information
Version: ? ?6.0.0
Revision: ? 6c1c284
Directory: ?/home/git/gitlab
DB Adapter: mysql2
URL: ? ? ? ?http://myserver.com
HTTP Clone URL: http://myserver.com/some-project.git
SSH Clone URL: ?git@myserver.com:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: ? ?1.7.0
Repositories: ? /home/git/repositories/
Hooks: ? ? ?/home/git/gitlab-shell/hooks/
Git: ? ? ? ?/usr/bin/git
sudo -u git -H捆綁執(zhí)行rake gitlab:check
RAILS_ENV=production
Checking Environment ...
Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes
Checking Environment ... Finished
Checking GitLab Shell ...
GitLab Shell version >= 1.7.0 ? ... OK (1.7.0)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
post-receive hook up-to-date? ... yes
post-receive hooks in repos are links: ...
[Group] / [Project] ... repository is empty
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Checking Sidekiq ... Finished
Checking GitLab ...
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
Projects have satellites? ...
[Group] / [Project] ... can't create, repository is empty
Redis version >= 2.0.0? ... yes
Your git bin path is"/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.8.1)
Checking GitLab ... Finished
ssh -T git@myserver.com
Welcome to GitLab, Christian Hammer!
貓/home/git/.ssh/authorized_keys
command="/home/git/gitlab-shell/bin/gitlab-shell key-2",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa [key] [email]
(重新)啟動(dòng)sidekiq解決了問(wèn)題:
sudo -Hu git RAILS_ENV=production bundle exec rake sidekiq:start
我有同樣的問(wèn)題。 但是對(duì)我而言,重啟sidekiq并不能解決問(wèn)題。 因此,我為相同的錯(cuò)誤消息保留了一個(gè)小的解決方案。 我管理著運(yùn)行g(shù)itlab的服務(wù)器,因此我為存儲(chǔ)庫(kù)創(chuàng)建了一個(gè)用于遠(yuǎn)程ssh訪問(wèn)(gitlab-server.pub)的密鑰和另一個(gè)(gitlab-repo.pub)密鑰。 在gitlab界面中,我上傳了gitlab-repo.pub,但是我忘記了git告訴要使用哪個(gè),因此像這樣更新~/.ssh/config之后,一切正常
根據(jù)您提供的信息,它無(wú)法創(chuàng)建。 請(qǐng)檢查存儲(chǔ)庫(kù)/ [group]目錄中存在的內(nèi)容。
如果您的存儲(chǔ)庫(kù)是一個(gè)裸存儲(chǔ)庫(kù)(一個(gè)沒(méi)有工作目錄的存儲(chǔ)庫(kù)),那么使用[project.git]之類的名稱是一種約定。
目錄/ repositories / [group]中沒(méi)有任何內(nèi)容。 我使用了" git remote add origin git@myserver.com:mygroup / myproject.git"
總結(jié)
以上是生活随笔為你收集整理的linux git reposi,关于linux:GitLab:无法从远程存储库读取的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: linux sh脚本 while,Lin
- 下一篇: 制作r710 linux系统盘,记一次云