gitlab

Gitlab CI runner not able to expose ports of nested Docker containers

╄→尐↘猪︶ㄣ 提交于 2019-12-09 07:48:05
问题 When using GitLab CI, as well as the gitlab-ci-multi-runner , I'm unable to get internally-started Docker containers to expose their ports to the "host", which is the Docker image in which the build is running. My .gitlab-ci.yml file: test: image: docker stage: test services: - docker:dind script: - APP_CONTAINER_ID=`docker run -d --privileged -p "9143:9143" appropriate/nc nc -l 9143` - netstat -a - docker exec $APP_CONTAINER_ID netstat -a - nc -v localhost 9143 My command: gitlab-ci-multi

Gitlab can't clone repository even though ssh works

喜夏-厌秋 提交于 2019-12-09 05:16:58
问题 As the title states, I can't clone a repository from a Gitlab 6 server even though the ssh seems to work. When trying to clone, it looks like this: git clone ssh://git@domain.de:1337/project/repository.git Cloning into 'repository'... Access denied. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. In the project, I have the role of "developer" which should have the rights to clone a repository? I also checked if my

Continuous Deployment of a Node.js app to Heroku using GitLab

ⅰ亾dé卋堺 提交于 2019-12-09 04:48:40
问题 There are tutorials covering the deployment of Ruby and Python apps but I can't find good documentation or examples for NodeJS. http://docs.gitlab.com/ce/ci/examples/test-and-deploy-python-application-to-heroku.html http://docs.gitlab.com/ce/ci/examples/test-and-deploy-ruby-application-to-heroku.html Does anyone have a .gitlab-ci.yml to share? 回答1: I have found a detailed article for continuous integration on Heroku: https://medium.com/@seulkiro/deploy-node-js-app-with-gitlab-ci-cd

Gitlab with non-standard SSH port (on VM with Iptable forwarding)

你离开我真会死。 提交于 2019-12-09 04:08:30
问题 My gitlab is on a virtual machine on a host server. I reach the VM with a non-standard SSH port (i.e. 766 ) which an iptable rule then forward from host:766 to vm:22 . So when I create a new repo, the instruction to add a remote provide a mal-formed URL (as it doesn't use the 766 port. For instance, the web interface give me this: Malformed git remote add origin git@git.domain.com:group/project.git Instead of an URL containing :766/ before the group. Wellformed git remote add origin git@git

`git clone project2` in gitlab-ci.yml?

戏子无情 提交于 2019-12-09 03:18:47
问题 I'd like Gitlab CI to fetch source code of another project. Is there a better way than adding a read-only deploy key and setting it up in .gitlab-ci.yml? 回答1: You can also use GIT SUBMODULES within your project A to refer to project B and then add GIT_SUBMODULE_STRATEGY: recursive to the gitlab-ci.yml file in project A. This also enables you to specifically include a specific branch or commit from your subproject. https://docs.gitlab.com/ce/ci/git_submodules.html 来源: https://stackoverflow.com

Clone gitlab project that uses git lfs without giving password all the time

心已入冬 提交于 2019-12-09 03:16:56
问题 I decided to try git lfs on gitlab. I noticed that it doesn't work with ssh so I decided to use https for it. Push works just fine but when I tried to clone my project it asked me for a username and a password for every file. That's kind of annoying. Is there any workaround to it? EDIT 2018 This problem persist, where the real solution? There are a simple and direct recipe for it? The links https://git-scm.com/docs/gitcredentials and git-lfs/wiki/Tutorial have perhaps something, but no

Login to Gitlab using cURL

安稳与你 提交于 2019-12-09 00:52:22
问题 For testing a command line tool against a Gitlab instance in Docker, I would like to login to Gitlab using username and password and grab the created session to authenticate my API requests. Therefore I do the following: curl the user login page with curl -i http://localhost:8080/users/sign_in -s get me the _gitlab_session from the headers get me the authenticity_token from the login form send a second curl request with curl 'http://localhost:8080/users/sign_in' \ -H "_gitlab_session=${cookie

Git can't connect to Gitlab, SSH verification error

倖福魔咒の 提交于 2019-12-08 23:14:29
I've been trying to pull down a repository from Gitlab using SSH keys. All done in command line on Windows 8 via a Ubuntu VM. I've added my public key to my Gitlab account and then added my private key to the ssh-agent and didn't seem to have any errors in doing so but when I try and do a git pull or push I run in to this error; fatal: unable to access 'https://git.mgmt.local/XXX/project-name.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none And that's run me straight in to a wall ... no idea on what's wrong, can anyone point me in the

GitLab-CI Multi Runner php composer cache

本小妞迷上赌 提交于 2019-12-08 23:09:32
问题 I'm using gitlab-ci-multi-runner with docker containers. Everything is going fine, but docker containers don't keep the composer cache so in every run composer downloads dependencies again and again, which takes a lot of time. Is there any way to configure gitlab-ci-runner docker container to keep the composer cache or mount a volume on each run where the composer cache is kept? 回答1: You could modify the composer cache path and write the stuff to a docker volume. That storage is persistent

gitlab操作笔记

情到浓时终转凉″ 提交于 2019-12-08 21:32:26
基本命令 准备 1. 安装所需命令   sudo yum install curl openssh-server openssh-clients postfix cronie -y 2. 安装SSH   sudo yum install curl policycoreutils-pythonopenssh-server -y 3. 将SSH设置成开机自启动,并启动   sudo systemctl enable sshd && sudo systemctl start sshd 4. 将SSH暴露到防火墙外面去   sudo firewall-cmd --permanent --add-service=http 5. 安装Postfix以发送通知邮件   sudo yum install postfix -y 6. 将Postfix设置成开机自启动,并启动   sudo systemctl enable postfix && sudo systemctl start postfix 安装 1. 国内下载镜像地址,根据自己的系统是6还是7进行选择,我的系统是7,我这里选择下载10.2.7版本,执行如下命令进行下载   wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.2.7-ce.0