gpt4 book ai didi

git push 在本地 gitlab 存储库上失败

转载 作者:行者123 更新时间:2023-12-02 14:04:12 26 4
gpt4 key购买 nike

  • 我在 /home/myuser/gitlab 中安装了 Gitlab .
  • 我创建了一个代表 testing
  • 按照说明,我添加了一个 Remote git@localhost:root/testing.git

  • 这是我的/home/myhome/.ssh/config 文件
    Host mylocalhost
    Hostname localhost
    User git
    IdentityFile /home/myuser/.ssh/id_rsa

    当我运行 ssh mylocalhost ,我有正确的消息 Welcome to GitLab, Administrator! .但是,我得到以下输入
    debug2: channel 0: rcvd eof
    debug2: channel 0: output open -> drain
    debug2: channel 0: obuf empty
    debug2: channel 0: close_write
    debug2: channel 0: output drain -> closed
    debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
    debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
    debug2: channel 0: rcvd eow
    debug2: channel 0: close_read
    debug2: channel 0: input open -> closed
    debug2: channel 0: rcvd close
    debug3: channel 0: will not send data after close
    debug2: channel 0: almost dead
    debug2: channel 0: gc: notify user
    debug2: channel 0: gc: user detached
    debug2: channel 0: send close
    debug2: channel 0: is dead
    debug2: channel 0: garbage collecting
    debug1: channel 0: free: client-session, nchannels 1
    debug3: channel 0: status: The following connections are open:
    #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)

    Transferred: sent 3284, received 3480 bytes, in 0.4 seconds
    Bytes per second: sent 7501.3, received 7949.0
    debug1: Exit status 0`

    在我的 GitLab日志
    Started GET "/api/v3/internal/allowed?key_id=4&action=git-receive-pack&ref=_any&project=testing" for 127.0.0.1 at 2013-11-07 16:48:00 +0100

    顺便说一句,每次我运行一些 git命令,我收到消息
    ssh: Could not resolve hostname mylocalhost: nodename nor servname provided, or not known
    fatal: Could not read from remote repository.

    有人有想法吗?

    更新:运行 gitlab-shell/bin/check输出
    Check GitLab API access: OK
    Check directories and files:
    /Users/git/repositories: OK

    bundle exec rake gitlab:env:info RAILS_ENV=production输出
    System information
    System: Mac OS X 10.9
    Current User: myname
    Using RVM: yes
    RVM Version: 1.21.7
    Ruby Version: 2.0.0p195
    Gem Version: 2.0.3
    Bundler Version:1.3.5
    Rake Version: 10.1.0

    GitLab information
    Version: 6.2.0.pre
    Revision: ea72f4f
    Directory: /Users/git/gitlab
    DB Adapter: mysql2
    URL: http://localhost
    HTTP Clone URL: http://localhost/some-project.git
    SSH Clone URL: git@localhost:some-project.git
    Using LDAP: no
    Using Omniauth: no

    GitLab Shell
    Version: 1.7.1
    Repositories: /Users/git/repositories/
    Hooks: /Users/git/gitlab-shell/hooks/
    Git: /usr/bin/git

    和我的 gitlab.yml似乎是正确的

    最佳答案

    When running gitlab service, I get The GitLab Unicorn webserver is not running.
    The GitLab Sidekiq job dispatcher with pid 66802 is running.
    But running bundle exec rake gitlab:check RAILS_ENV=production, I get Checking Sidekiq ... Running? ... no



    确保您在每一步都与正确的用户进行了安装和检查(在 su (root) 和 su git 之间)

    OP Newben confirms :

    when I sudo my check, sidekiq is indeed runnning.



    关于 repo :

    I changed the remote origin url git remote set-url origin git@localhost:repositories/root/#{myrepo}.git and now it works !



    这来自于 施加的新限制。 GitLab 6.0 :

    From now on a group is not just a directory for projects. It also allows you to add users. After user is added to group – it automatically get access to all existing and new projects inside group.
    You can also have have multiple owners for a group who can manage members/projects.



    另见“ What are the differences between gitlab team and gitlab group?”。

    With this GitLab becomes more group oriented. That is why we no longer support global namespaces. Project can be part of group or user only.



    项目(您的 myrepo.git )只能是组或用户的一部分(此处为用户帐户 root )。

    关于git push 在本地 gitlab 存储库上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19840478/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com