我已经在虚拟机上运行了gitlabhq rails服务器,按照本教程https://github.com/gitlabhq/gitlab-recipes/blob/master/install/centos/README.md的 1-6步执行并启动rails server execution 命令sudo -u git -H bundle exec rails s -e production.之后我创建了用户,使用管理工具并在此用户下创建了新项目.然后我一直试图将现有项目推送到这个仓库.但在最后一步,git push origin master失败了错误
[远程拒绝]主 - >主(预接收挂钩拒绝)
附加信息:
1)我没有通过电子邮件激活链接激活用户(项目所有者),因为我没有在服务器端配置后期服务,我在本手册中没有找到如何操作的说明.
2)Gitlab服务器生成如何将项目推送到repo并且没有repositories/路径的提示.我的意思是它生成git@mygitlabhost:user/repo.git而不是git@mygitlabhost:repositories/user/repo.git正确的.
3)当我试图调试它,我打开pre-receive里面回购脚本在服务器上,并试图输出变量(有其中3) refs = ARGF.read,key_id = ENV['GL_ID']并repo_path = Dir.pwd发现,该KEY_ID总是空的.也许问题就在这里......如果是这样,请给我一些如何解决这个问题的建议.谢谢
任何人都可以让我知道Jenkins和其他CI之间有什么区别,比如Gitlab-CI,drone.io随GIT发行.在一些研究中,我只能提出Gitlab社区版不允许添加Jenkins,但Gitlab企业版可以.还有其他重大差异吗?
我想通过使用我的gitlab帐户中的私有令牌来克隆gitlab存储库而不提示我的自动化脚本.
有人能为我提供样品吗?
我知道我可以使用用户和密码这样做:
git clone https://" + user + ":" + password + "@" + gitlaburl;
Run Code Online (Sandbox Code Playgroud)
我知道用ssh键是可能的
但是,这两种选择都不够
我创建了一个自定义 docker 映像并将其推送到 docker hub,但是当我在 CI/CD 中运行它时,它给了我这个错误。
exec /usr/bin/sh: exec format error
在哪里 :
Dockerfile
FROM ubuntu:20.04
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN apt-get install -y python3-pip
RUN pip3 install robotframework
Run Code Online (Sandbox Code Playgroud)
.gitlab-ci.yml
robot-framework:
image: rethkevin/rf:v1
allow_failure: true
script:
- ls
- pip3 --version
Run Code Online (Sandbox Code Playgroud)
输出
Running with gitlab-runner 15.1.0 (76984217)
on runner zgjy8gPC
Preparing the "docker" executor
Using Docker executor with image rethkevin/rf:v1 ...
Pulling docker image rethkevin/rf:v1 ...
Using docker image sha256:d2db066f04bd0c04f69db1622cd73b2fc2e78a5d95a68445618fe54b87f1d31f for rethkevin/rf:v1 with digest rethkevin/rf@sha256:58a500afcbd75ba477aa3076955967cebf66e2f69d4a5c1cca23d69f6775bf6a …Run Code Online (Sandbox Code Playgroud) 我尝试从GitLab克隆存储库(GitLab 6.6.2 4ef8369)并且错误:
remote: Counting objects: 66352, done.
remote: Compressing objects: 100% (10417/10417), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Run Code Online (Sandbox Code Playgroud)
如何避免这个错误?
我的问题是我不能从GitLab推送或获取.但是,我可以克隆(通过HTTP或通过SSH).我尝试推送时出现此错误:
权限被拒绝(publickey)致命:无法从远程存储库读取
从我看过的所有主题来看,这就是我所做的:
现在我想要打我的电脑.如果您对如何解决我的问题有任何见解,我们将不胜感激.
我已经设置好了,我们正在运行GitLab v6.0.1的默认安装(我们即将升级).这是一个"生产"设置,遵循本指南正好写到这封信:
https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md
现在,我们如何安全地更改工作安装的URL?
显然我们的网址很长,我们想出了一个新网址.我编辑了许多配置文件,"应用程序状态检查"报告一切正常.我重新启动了服务器,以确保一切正常.
我可以通过原始SSL访问Nginx.我可以浏览GitLab站点,创建一个存储库等.我可以分叉并提交就好了.
一切似乎都没问题; 但是,由于这不是我的原生环境,我想仔细检查我是否已经完成了重命名GitLab网站的所有工作.
我编辑的文件是:
/etc/hosts
127.0.0.1 localhost
10.0.0.10 wake.domain.com wake
10.0.0.10 git.domain.com git
/home/git/gitlab/config/gitlab.yml
production: &base
gitlab:
host: git.domain.com
/home/git/gitlab-shell/config.yml
gitlab_url: "https://git.domain.com"
^- yes, we are on SSL and that is working, even on a new URL
/etc/nginx/sites-available/gitlab
server {
server_name git.domain.com
Run Code Online (Sandbox Code Playgroud) 如何使用Gitlab设置代码审查?我认为它在Gitlab网站上列为一个功能,但我似乎无法找到如何设置一个的说明(就此而言,任何Gitlab用户手册的链接都将非常受欢迎).
我的一些搜索表明,"合并请求"是要走的路......但我发现它们有限制.已发布的合并请求显示一个分支与另一个分支之间的所有提交.我似乎只能查看为每个单独提交生成的差异.例如,假设我有一个我想要查看的文件.这是一个新文件,但我在dev分支上提交了超过10次提交的更改.如果我从集成发出该dev分支的合并请求,我会看到10个提交,每个提交都显示对文件进行的增量更改...我想查看整个事情.它是新的!
我在这里吠叫错了吗?是否有一个我可以在GitLab中使用的实际代码审查工具,或者是合并请求的方式,如果他们是我使用它们不正确?在这里设置正确的代码审查的最佳方法是什么?
我们正在为我们的私人项目使用GitLab.有一些来自github的分叉库,我们想要安装为npm模块.直接从npm安装该模块是可以的,例如:
npm install git://github.com/FredyC/grunt-stylus-sprite.git
...也正常工作,但对GitLab做同样的事情,只是更改域名会让我犯这个错误.
npm WARN `git config --get remote.origin.url` returned wrong result (git://git.domain.com/library/grunt-stylus-sprite.git)
npm ERR! git clone git://git.domain.com/library/grunt-stylus-sprite.git Cloning into bare repository 'D:\users\Fredy\AppData\Roaming\npm-cache\_git-remotes\git-git-domain-com-library-grunt-stylus-sprite-git-6f33bc59'...
npm ERR! git clone git://git.domain.com/library/grunt-stylus-sprite.git fatal:unable to connect to git.domain.com:
npm ERR! git clone git://git.domain.com/library/grunt-stylus-sprite.git git.domain.com[0: 77.93.195.214]: errno=No error
npm ERR! Error: Command failed: Cloning into bare repository 'D:\users\Fredy\App
Data\Roaming\npm-cache\_git-remotes\git-git-domain-com-library-grunt-stylus-spr
ite-git-6f33bc59'...
npm ERR! fatal: unable to connect to git.domain.com:
npm ERR! git.domain.com[0: xx.xx.xx.xx]: errno=No error
Run Code Online (Sandbox Code Playgroud)
从GitLab的Web界面,我有这个URL
git@git.domain.com:library/grunt-stylus-sprite.git.针对npm install它运行此尝试git从npm注册表安装模块. …