docker gitlab and gitlab api
https://docs.gitlab.com/ee/api/repositories.html
curl --header "PRIVATE-TOKEN: fxhDXPRJAowCouXEobrz" "http://localhost/api/v4/repositories"
curl --header "PRIVATE-TOKEN: W72WXtZCW6hGmyPT_meU" "http://git.unipus.cn/api/v4/projects"
_这个地址访问获取的项目数量是20个,最后一下项目的显示下标是19,之所以没有展示完所有项目,是因为gitlab api默认做了分页处理,如果不建入分页参数,会默认只显示20条,用下面的地址访问,就可以显示更多项目了:
https://git.ynpay.cc/api/v3/projects/all?per_page=100&page=1?private_token=XXXXXX
perpage max is 100
curl --header "PRIVATE-TOKEN: W72WXtZCW6hGmyPT_meU" "http://git.unipus.cn/api/v4/projects?per_page=100&page=1" > a1.txt
curl --header "PRIVATE-TOKEN: W72WXtZCW6hGmyPT_meU" "http://git.unipus.cn/api/v4/projects?per_page=100&page=2" > a2.txt
import requests
url = 'http://git.unipus.cn/api/v4/projects?private_token=W72WXtZCW6hGmyPT_meU'
res = requests.get(url)
if res.status_code != 200:
raise ServerError(res.get('message'))
data = res.json()
for i in data:
print i,i[u'ssh_url_to_repo']
print "all success"
import json
filename = 'a2.txt'
with open(filename) as f:
gpd_list = json.load(f)
# 遍历列表的每个元素,每个元素是一个GDP数据项
for gpd_dict in gpd_list:
print gpd_dict['id'],gpd_dict['description'],gpd_dict['ssh_url_to_repo']
install gitlab as docker
https://www.jianshu.com/p/24959481340e
https://www.cnblogs.com/zuxing/articles/9329152.html
gitlab docker
docker pull gitlab/gitlab-ce:latest
mkdir -p gitlab/config
mkdir -p gitlab/logs
mkdir -p gitlab/data
--hostname localhost \
sudo docker run --detach \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--restart always \
--volume /opt/dockerRoot/dockerData/gitlab/config:/etc/gitlab \
--volume /opt/dockerRoot/dockerData/gitlab/logs:/var/log/gitlab \
--volume /opt/dockerRoot/dockerData/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
And restart this container to reload settings.
To do it use docker exec:
docker exec -it gitlab vim /etc/gitlab/gitlab.rb
docker restart gitlab
docker exec -it gitlab vim /var/opt/gitlab/gitlab-rails/etc/gitlab.yml
For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
If this container fails to start due to permission problems try to fix it by executing:
docker exec -it gitlab update-permissions
docker restart gitlab
docker gitlab and gitlab api的更多相关文章
- Docker下安装GitLab
1.需要先安装Docker和Docker Compose,参考:https://www.cnblogs.com/hackyo/p/9280042.html 2.配置GitLab SSL(可跳过): m ...
- 利用docker compose启动gitlab及runner
添加docker compose配置文件 新建文件docker-compose.yml,输入如下内容: gitlab: image: 'gitlab/gitlab-ce:latest' contain ...
- 使用Docker Image跑Gitlab
下载gitlab docker镜像 docker pull gitlab/gitlab-ce:latest 启动gitlab服务 sudo docker run --detach \ --hostna ...
- 在docker 中搭建gitlab环境
docker run --name gitlab -it -p : -p : -p : \ --env 'GITLAB_SECRETS_DB_KEY_BASE=Rpwq35wjLJ5N6CrkvdXs ...
- docker下部署gitlab
docker用来隔离应用还是很方便的,一来本身的操作较为简单,二来资源占用也比虚拟机要小得多,三来也较为安全,因为像数据库这样的应用不会再全局暴露端口,同时应用间的通信通过加密和端口转发,更加安全. ...
- docker中搭建gitlab
1, 下载镜像 docker pull sameersbn/gitlab:7.4.3 # 下载gitlab镜像 docker pull sameersbn/mysql:latest # 下载gitla ...
- Ubuntu Docker 简单安装 GitLab
相关博文: Ubuntu 简单安装 Docker Ubuntu 简单安装和配置 GitLab 服务器版本 Ubuntu 16.04 LTS. 1. 安装和配置 安装命令: sudo docker ru ...
- docker 下安装gitlab
1.找到docker镜像 docker search gitlab 2.下载gitlab镜像 docker pull gitlab/gitlab-ce/ 3.通常会将 GitLab 的配置 (etc ...
- Docker快速部署gitlab
环境: Centos7.5 安装Docker 1.移除旧版本: $ sudo yum remove docker \ docker-client \ docker-client-latest \ do ...
随机推荐
- DDL 操作数据库
DDL 操作数据库:常用的操作 CRUD 一.C(create)创建 1.创建数据库 create database 数据库名称; 2.创建数据库,判断是否存在,再创建(如果存在,就不再创建) cre ...
- Referer和空Referer
参考CSDN 原文:https://blog.csdn.net/hxl188/article/details/38964743 Referer和空Referer 最近公司有个接口需要针对几个域名加白名 ...
- 分布式系统session一致性解决方案
在单机系统中,不存在Session共享问题,但是在分布式系统中,我们必须实现session共享机制,使得多台应用服务器之间会话统一,如果不进行Session共享会出现数据不一致,比如:会导致请求落到不 ...
- c# 字符串修改
- The Essential Burp Suite
OK we have download teh burp suite .let's begin start the tool 1.if we want to use the total mem ...
- Keras实现Self-Attention
本文转载自:https://blog.csdn.net/xiaosongshine/article/details/90600028 一.Self-Attention概念详解 对于self-atten ...
- linux远程工具
实际工作中,linux系统都不会在我们自己的电脑上,linux系统安装在机房的服务器上,我们操作linux不可能跑到机房去,所以我们需要有一个工具,能在公司通过网络远程连接到机房的linux服务器上 ...
- gdb调试(二)
继续研究gdb相关的调试技巧,话不多说进入正题: 查看运行时数据: 这个上节中已经用过了,这里就不多说了,比较简单 还是有上节中的simple.c例子,不过得稍微做一些修改为了使用这些命令: simp ...
- [转]Serverless实践
转载的,原文: https://www.cnblogs.com/middleware/p/9470533.html ------------------------------------------ ...
- c# DES 加密解密方法
#region 密钥 private static string key = "abcd1234"; //密钥(长度必须8位以上) #endregion #region DES加密 ...