我的master分支在受保护。
我只想对主进行小的(一行修改)提交。
我不想做一个新的分支和主人合并。
但是当我在主服务器上推代码时,我会收到消息:
remote: GitLab: You are not allowed to push code to protected branches on this project.
To https://gitlab.com/xyz/api_xyz.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs
我想使用Gitlab api to create a commit在单个分支上创建多个提交,但我担心Gitlab的CI会为每个提交激活。 使用存储库/提交api创建提交会触发CI吗?如果没有,有没有办法在我完成时手动触发CI?如果是这样,有没有办法像git push -o ci.skip (see here)那样压制它呢?
我已经创建了一个简单的提交后脚本:
#!/bin/bash
# Update server when any user commit some changes
# This ssh connection execute a script with sudo that pull git server repo
ssh -i /var/opt/gitlab/.ssh/git_new git@ipaddress "sudo /home/git/pull.sh"
echo "Finished hook execution" >> /tmp/hook_lo
(我可以看到有很多关于这方面的问题,但我还没有找到一个可以解决我的确切问题的)。
我正在运行gitlab-ci,当运行者检查我的代码时,它会作为一个独立的头来运行。下面是我在runners目录中运行git status命令时得到的结果。
git status
# HEAD detached at 847fe59
nothing to commit, working directory clean
对于我正在做的工作,我需要做的是将这个头重新附加到我的开发分支,然后在完整的存储库中执行git pull,以便在docker容器中使用。我猜gitlab ci只检查最后一次提交,以保存克隆下来的完整代
我正在使用git做我的项目。我正在使用一些远程git repos。在一些成功的推送命令之后,其中一个遥控器为我的新推送命令返回了以下错误: remote: GitLab: API is not accessible
To https://git.fosscommunity.in/mehdi/mikfrm.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to
'https://git.fosscommunity.in/meh