我创建了项目并添加了ssh-key(都通过webinterface),但是当我尝试向存储库中推送内容时,出现此错误:"无法从存储库读取"。 这可能是由于以下事实:.git-project-file在/ home / git / repositories / [group] /文件夹中不存在。

gitlab-check返回:

[Group] / [Project] ... can't create, repository is empty

推送到存储库时出错

git remote add origin git@myserver.com:[group] / [project] .git

git push -u原始主机

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.

是什么引起了错误

ls -ld /home/git/repositories/[group]/[project].git

File not found.

为什么未创建文件?

有关我的设置的信息

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捆绑执行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捆绑执行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]

(重新)启动sidekiq解决了问题:

sudo -Hu git RAILS_ENV=production bundle exec rake sidekiq:start

我有同样的问题。 但是对我而言,重启sidekiq并不能解决问题。 因此,我为相同的错误消息保留了一个小的解决方案。 我管理着运行gitlab的服务器,因此我为存储库创建了一个用于远程ssh访问(gitlab-server.pub)的密钥和另一个(gitlab-repo.pub)密钥。 在gitlab界面中,我上传了gitlab-repo.pub,但是我忘记了git告诉要使用哪个,因此像这样更新~/.ssh/config之后,一切正常

根据您提供的信息,它无法创建。 请检查存储库/ [group]目录中存在的内容。

如果您的存储库是一个裸存储库(一个没有工作目录的存储库),那么使用[project.git]之类的名称是一种约定。

目录/ repositories / [group]中没有任何内容。 我使用了" git remote add origin git@myserver.com:mygroup / myproject.git"

linux git reposi,关于linux:GitLab:无法从远程存储库读取相关推荐

  1. git:致命的:无法从远程存储库读取

    本文翻译自:git: fatal: Could not read from remote repository I am trying to set git up with http://daniel ...

  2. IDEA使用git出现SSH:无法解析主机名XXX:名称或服务未知无法从远程存储库读取错误

    IDEA使用git出现SSH:无法解析主机名XXX:名称或服务未知无法从远程存储库读取错误这个也是大家经常出现的一个错误,今天就分享一下如何进行配置 你在IDEA中进行pull或者push的时候会出现 ...

  3. git git 查看远程库_如何从Git远程存储库中提取

    git git 查看远程库 Note: This the fourth video in the Git for beginners series. Watch the first video her ...

  4. linux存储安装教程,在Linux下安装Pngquant的三种方法:从存储库,源代码及使用Cargo安装...

    本文介绍在Linux操作系统下安装Pngquant的三种方法,即从存储库.从源代码及使用Cargo安装,可用在Arch Linux.Debian.Ubuntu.Linux Mint.Fedora.op ...

  5. 如何将现有的非空目录转换为Git工作目录并将文件推送到远程存储库

    我有一个非空目录(例如/ etc / something),其中包含无法重命名,移动或删除的文件. 我想将这个目录检查到git中. 我希望能够使用"git push"或类似的东西将 ...

  6. linux git 备份迁移,linux – 从GitHub迁移到GitLab(作为POSIX环境中的遥控器)

    我正在迁移到GitLab.我需要编辑包含"github"的工作站上的所有.git / config文件,并用"gitlab"替换该单词.我怀疑使用单个find命 ...

  7. linux git忘记密码,Linux下 保存 git账号密码

    一.通过文件方式 1.在~/下, touch创建文件 .git-credentials, 用vim编辑此文件,输入内容格式: touch .git-credentials vim .git-crede ...

  8. linux git 记录密码,linux git 保存用户名和密码

    一.通过文件方式 1.在~/下, touch创建文件 .git-credentials, 用vim编辑此文件,输入内容格式: touch .git-credentials vim .git-crede ...

  9. linux git源代码安装,linux下从源代码安装git

    之所以有这样的需求,是因为部分预安装的git版本太低,很多功能没有并且安全性存在问题. 比如git submodule add xxx@host:yyy.git必须在父repo的root目录安装,而新 ...

最新文章

  1. Python在计算内存时值得注意的几个问题
  2. iOS自定义简易刷新视图(仿MJRefresh)
  3. 什么叫系统的可扩展性?
  4. 利用ComponentWillReceiveProps解决异步问题
  5. 在Nginx和Apache服务器配置https
  6. 【最新】docker 安装elasticsearch + kibana步骤【第二篇_kibana】
  7. 探索C++的秘密之详解extern C
  8. LeetCode 160. Intersection of Two Linked Lists
  9. 在spring中手动编写事务
  10. 20191221每日一句
  11. 李践《高效人士的五项管理-行动日志》 表格
  12. bandzip关闭右键新建文件夹选项方法步骤
  13. 绿点 | 区块链介入下的绿色经济 x 妳格局LadyVision x WinMap+!
  14. LAMP架构简介与概述 及服务安装
  15. 2022年第三届全国大学生网络安全精英赛
  16. Roberts算子,matlab代码实现
  17. android app签名方法
  18. git 详解-进阶篇
  19. 珠宝达人必须知晓的10大宝石产地
  20. 51单片机智能小车——寻迹

热门文章

  1. MATLAB之GUI学习经典举例
  2. 差分能量分析介绍(三)
  3. java元婴期(30)----java进阶(springmvc(4)---参数绑定(下)springmvc校验异常处理)
  4. 【Flask】Jinja2模板的使用及控制语句
  5. 如何在C语言中巧妙地避免使用if语句?
  6. linux两个网段默认网关_Linux下配置多网卡多网关
  7. 安卓开发之Intent系统调用系统相机Camera(中软杯项目)
  8. 如何使用ADLab搭建活动目录实验环境来练习渗透测试技术
  9. 如何跟踪log4j漏洞原理及发现绕WAF的tips
  10. 002 通过send断点分析功能call