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的更多相关文章

  1. Docker下安装GitLab

    1.需要先安装Docker和Docker Compose,参考:https://www.cnblogs.com/hackyo/p/9280042.html 2.配置GitLab SSL(可跳过): m ...

  2. 利用docker compose启动gitlab及runner

    添加docker compose配置文件 新建文件docker-compose.yml,输入如下内容: gitlab: image: 'gitlab/gitlab-ce:latest' contain ...

  3. 使用Docker Image跑Gitlab

    下载gitlab docker镜像 docker pull gitlab/gitlab-ce:latest 启动gitlab服务 sudo docker run --detach \ --hostna ...

  4. 在docker 中搭建gitlab环境

    docker run --name gitlab -it -p : -p : -p : \ --env 'GITLAB_SECRETS_DB_KEY_BASE=Rpwq35wjLJ5N6CrkvdXs ...

  5. docker下部署gitlab

    docker用来隔离应用还是很方便的,一来本身的操作较为简单,二来资源占用也比虚拟机要小得多,三来也较为安全,因为像数据库这样的应用不会再全局暴露端口,同时应用间的通信通过加密和端口转发,更加安全. ...

  6. docker中搭建gitlab

    1, 下载镜像 docker pull sameersbn/gitlab:7.4.3 # 下载gitlab镜像 docker pull sameersbn/mysql:latest # 下载gitla ...

  7. Ubuntu Docker 简单安装 GitLab

    相关博文: Ubuntu 简单安装 Docker Ubuntu 简单安装和配置 GitLab 服务器版本 Ubuntu 16.04 LTS. 1. 安装和配置 安装命令: sudo docker ru ...

  8. docker 下安装gitlab

    1.找到docker镜像 docker search gitlab 2.下载gitlab镜像 docker pull  gitlab/gitlab-ce/ 3.通常会将 GitLab 的配置 (etc ...

  9. Docker快速部署gitlab

    环境: Centos7.5 安装Docker 1.移除旧版本: $ sudo yum remove docker \ docker-client \ docker-client-latest \ do ...

随机推荐

  1. 笔谈OpenGL ES(三)

    昨天下午以及今天一天,公司安排了新员工培训课程,占用了自己的一些时间,但是也了解到一些新的有利于自身的东西.进公司就要进有完善公司体系和制度的公司,小公司真的是没搞头的,我体验过,反正小公司以后是不会 ...

  2. 视觉AI风口一触即发,虹软AI沙龙点金深圳

    7月26日,虹软AI沙龙在深圳湾科技生态园空间举办.AI沙龙是基于虹软视觉开放平台的开发者交流沙龙,旨在通过分享最新的实战案例,帮助开发者解决技术及落地难题,让技术更贴近实用场景. 本次活动中,深圳市 ...

  3. arm9的时钟和定时器

    时钟 两种能够提供时钟的方式: 1) 晶振 2) PLL(也就是锁相环):通用PLL需啊一个晶振,和对晶体特定频率分频或倍频的锁相环电路. 学习ARM9时钟的四步: 1) 晶振:12MHZ 2) 有多 ...

  4. Mac 下 安装Python3

    因为Mac系统自带Python2.7 所以我们开发要重新装Python3 直接运行下面就好 luohaotiandeMacBook-Pro:~ luohaotian$ which python /us ...

  5. Linux命令——systemctl

    前言 systemctl本身的意义并不仅仅是一个命令那么简单,他标志着SysV时代的终结,Systemd时代的开始.CentOS 7.X系列已经抛弃SysV,全面拥抱Systemd这个init sys ...

  6. jQuery和bootstrap

    1. jQuery学习,搜索开发者网络: js学习: https://www.apeland.con/web/20/568 https://www.apeland.con/web/21 vue饿了么 ...

  7. k83 svc

    一,deployment Deployment为Pod和Replica Set下一代Replication Controller)提供声明式更新 1,配置示例 apiVersion: apps/v1 ...

  8. Vue钩子函数

    Vue的生命周期函数 beforeCreate:function(){ console.log('1-beforeCreate 初始化之后'); }, created:function(){ cons ...

  9. SVM:从数学上分析为什么优化cost function会产生大距离(margin)分类器

    向量内积 uTv = vTu为两个二维向量的内积,它等于p*||u||(其中p为向量v在向量u上的投影长度,是有+/-之分的,||u||为向量u的长度也称为范数),它是一个实数(是一个标量). 如上图 ...

  10. navicat连接oracle报错:ORA-12737 Instant Client Light:unsupported server character set ZHS16GBK

    今天使用Navicat连接Oracle数据库,报了下面的这个错误:“ORA-12737 Instant Client Light:unsupported server character set ZH ...