代码之家  ›  专栏  ›  技术社区  ›  Atinesh

无法将代码推送到gitlab存储库

  •  0
  • Atinesh  · 技术社区  · 6 年前

    项目所有者(michael365)维护了一个存储库,并向我提供了开发人员访问权限。我试图推动代码,但我得到这个错误

    remote: GitLab: API is not accessible
        To gitlab.com:michael365/bim.git
         ! [remote rejected] master -> master (pre-receive hook declined)
        error: failed to push some refs to 'git@gitlab.com:michael365/bim.git'
    

    虽然我已经在SSH部分设置了公钥,但它仍然不起作用。我发出以下命令

    $ git add .
    
    $ git commit -m "Adding Initial Code"
    On branch master
    nothing to commit, working tree clean
    
    $ git push
    fatal: The current branch master has no upstream branch.
    To push the current branch and set the remote as upstream, use
    
        git push --set-upstream origin master
    
    $ git push --set-upstream origin master
    Counting objects: 3, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (2/2), done.
    Writing objects: 100% (3/3), 868 bytes | 868.00 KiB/s, done.
    Total 3 (delta 0), reused 0 (delta 0)
    remote: GitLab: API is not accessible
    To gitlab.com:michael365/bim.git
     ! [remote rejected] master -> master (pre-receive hook declined)
    error: failed to push some refs to 'git@gitlab.com:michael365/bim.git'
    

    1 回复  |  直到 6 年前
        1
  •  1
  •   S.K.    6 年前

    pre-receive hook declined

    询问远程回购的管理员,因为什么支票拒绝你的推送。通常情况下,您会收到一个正确的错误消息,说明什么检查失败了。

    推荐文章