gitlab

Gitlab access token for a single project or group?

我与影子孤独终老i 提交于 2020-08-26 03:58:49
问题 Is there a way to make an access token that is only usable for one project? It seems there are only personal access tokens, which gives access to all of my projects. 回答1: Yes! See GitLab 13.3 (August 2020) Project access tokens Project level access tokens allow access to a project without the need to provision a new GitLab user. Project access tokens can be generated by project Maintainers or Owners and be used to authenticate with the GitLab API. Project access tokens will be authorized as

Read webhook payload in Gitlab CI

↘锁芯ラ 提交于 2020-08-24 10:19:29
问题 I have a project ( PROJECT_A ) that is triggered through a webhook, and expects the variable $PRODUCT to be set. Its value is used to trigger a certain path in the build. The job in the .gitlab-ci.yml file looks like this: deploy: stage: publish script: - ./generate_doc.sh $PRODUCT A webhook call looks like this: http://<GITLAB_URL>/api/v4/projects/710/ref/master/trigger/pipeline?token=<TOKEN>&variables[PRODUCT]=<PRODUCT> I call this trigger through a webhook from other projects, including

git push fails with deny updating hidden ref

£可爱£侵袭症+ 提交于 2020-08-24 07:17:09
问题 I've a repository for my dotfiles and went to push changes from a branch only to encounter... $ git push Enumerating objects: 46, done. Counting objects: 100% (46/46), done. Writing objects: 100% (46/46), 3.20 MiB | 1.52 MiB/s, done. Total 46 (delta 0), reused 0 (delta 0) To gitlab.com:auser/dotfiles.git ! [remote rejected] kimura -> origin/kimura (deny updating a hidden ref) ! [remote rejected] master -> origin/master (deny updating a hidden ref) error: failed to push some refs to 'git

jenkins基础,手动、自动代码上线

丶灬走出姿态 提交于 2020-08-19 17:23:04
1. jenkins基本介绍与使用 1.1 jenkins介绍 官网 https://jenkins.io Jenkins是一个开源的、可扩展的持续集成、交付、部署(软件/代码的编译、打包、部署)基于web界面的平台。 Jenkins是一个工具集,提供了各种各样的插件 比如获取git上最新的代码 比如可以帮你编译源代码 比如可以调用自定义的shell脚本远程执行命令 官方文档 https://jenkins.io/doc/ 1.2 jenkins安装方式 (1)docker (2)windows (3)linux (4)war (5)yum 1.3 jenkins下载 2. 安装jenkins 2.1 安装java依赖环境 [root@jenkins ~]# yum -y install java 2.2 安装jenkins并启动 [root@jenkins ~]# yum -y localinstall jenkins-2.176.1-1.1.noarch.rpm [root@jenkins ~]# systemctl start jenkins && systemctl enable jenkins jenkins.service is not a native service, redirecting to /sbin/chkconfig. Executing /sbin

IDEA中搭建项目环境

房东的猫 提交于 2020-08-18 22:02:56
ladies and gentlemen,Welcome to my blog! 本文主要面对萌新,讲解在IDEA中搭建项目环境。 所以大佬们可以不用浪费时间了~ 当然,有问题和指正,欢迎下方留言~ 1. 使用GitLab将项目下载下来    1.1 选择:VCS——Checkout from Version Control——Git       1.2 输入GitLab的下载地址    2. 配置项目的IDEA环境    戳我~≥ω≤ 3. 配置项目的TomCat环境    别戳我~≥﹏≤ 来源: oschina 链接: https://my.oschina.net/u/4362330/blog/4321410

go modules 使用本地库、合规库、私有库

拈花ヽ惹草 提交于 2020-08-18 15:06:35
一、简介 公司项目使用 go module 开发的过程中会有一些自己的库要引用,这些库用gitlab管理,需要研究引用gitlab库的方法,下面是研究过程中的一些经验。 介绍两种引用方案: 1、引用本地目录 2、引用合规地址库 3、引用私有不合规库 4、 恶心至极的私有不合规库 上述名词中的 合规 是指: [x] 库的地址是通过域名方式访问 [x] 支持HTTPS [x] 库的地址通过 80 和 443 端口,而不是其它端口 满足上述条件即是 合规库 ,否则是 不合规库 ,由于通常不合规库都是私有的,这里直接叫 私有不合规库 。 其中,违反第3点的最为恶心(官方不支持,给官方提需求的同时,不得不吐槽这种情况太恶心了)。 注意:本文撰写于 2020年7月3日,go版本 1.14.4,到撰写日为止内容真实有效,均经过本人验证。 二、引用本地目录 修改文件 go.mod : module main go 1.14 // 替换规则 replace ( github.com/pborman/uuid => /data/go-packages/uuid v1.2.0 // 绝对路径 或 相对路径 都可以 ) // 源地址 require ( github.com/pborman/uuid v1.2.0 ) 默认使用 github.com/pborman/uuid 包会到 Github 上去下载