gitlab

Critical situation in removing a local branch

喜夏-厌秋 提交于 2019-12-08 19:28:48
问题 I using the following command to remove a local branch with force delete option: $ git branch -D <branch_name> My question is, If I delete a local branch that had an upstream set and then do a normal push, it won't delete the remote branch right? What should I do in this situation? [ NOTE ]: "-D" is force delete option. I want delete the local branch and keep the remote branch in origin. 回答1: git will only delete your local branch, please keep in mind that local and remote branches actually

Why can't gitlab-runner clone my project? (Incorrect hostname, failed to connect)

冷暖自知 提交于 2019-12-08 17:40:03
问题 I set-up a Gitlab server and need to run tests Windows using gitlab-runner.exe. The gitlab-runner's executor is set to shell , the config.toml looks like concurrent = 1 check_interval = 0 [[runners]] name = "PC123" url = "http://1.2.3.4/ci" token = "cd2b093adc5ca09ea41ee4eadb0752" executor = "shell" [runners.cache] When the test is spawned on a commit it fails with Cloning into 'C:/git/builds/ac70aeb9/0/test/myproject'... fatal: unable to access 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx

Gitlab CI - docker: command not found

一世执手 提交于 2019-12-08 16:23:32
问题 I am trying to build my docker image within the gitlab ci pipeline. However it is not able to find the docker command. /bin/bash: line 69: docker: command not found ERROR: Job failed: error executing remote command: command terminated with non-zero exit code: Error executing in Docker Container: 1 .gitlab-ci.yml stages: - quality - test - build - deploy image: node:8.11.3 services: - mongo - docker:dind before_script: - npm install quality: stage: quality script: - npm run-script lint test:

Gitlab CI / Docker: Use custom image for job

巧了我就是萌 提交于 2019-12-08 15:55:33
问题 This is how I do some linter test (eslint). linter: image: ubuntu:16.04 stage: test tags: - testing before_script: - apt-get update -y - apt-get install nodejs-legacy -yqq - apt-get install curl -yqq - curl https://install.meteor.com/ | sh - meteor npm install eslint eslint-plugin-react script: - ./node_modules/.bin/eslint --ext .js --ext .jsx . But with this every test will have to install the packages to the ubuntu image, which takes time. So I thought to build a image with exact this. I

gitlab throwing - failed to store ssl session

a 夏天 提交于 2019-12-08 13:50:14
问题 I am getting below error into pull,push etc git command. fatal: unable to access 'https://gitlab.com/test/test.git/': failed to store ssl session 回答1: Please delete password file from your pc/laptop. The path for the password file is C:..\AppData\Local\Atlassian\SourceTree I did and my issue resolved please try. 来源: https://stackoverflow.com/questions/53755626/gitlab-throwing-failed-to-store-ssl-session

difference between git merge ours theirs commands

跟風遠走 提交于 2019-12-08 13:07:14
问题 I am practising GIT. Whats the difference between below commands? git merge -s ours branch git merge -s theirs branch git merge -X ours branch git merge -X theirs branch 回答1: Before I start this answer, let me emphasize that there are two different words that are both spelled "merge". There is a verb form, to merge , which means "to combine changes". There is a noun or adjective form, a merge or a merge commit , which refers to a specific kind of commit. The git merge command usually does

centos7 搭建gitlabt服务器,并将svn迁移到git

 ̄綄美尐妖づ 提交于 2019-12-08 12:53:50
git作为目前最好用,也最好的版本管理器,是几乎每个公司和程序都要会用的东西,而在公司内,搭建一个git服务器作为代码储存中心就尤为必要,毕竟不可能用开源的github吧,而肯定也不会愿意给github交钱用私服库。那就自己搭建一个git服务器。 鉴于svn太过老旧,而且也不如git好用,越来越多的公司,准备将svn替换成git,这也是现在的趋势,下面就记录一下,搭建一个git服务器,然后将svn迁移到git上: 第一步:git只是一个使用的工具,但是,基于git,为了给公司内所有人提供代码版本管理,就需要类似github一样的代码托管平台,但是在github上的所有项目强制是公开的,如果想要建私人库是需要钱的,所以公司一般不会这样,这就有了GitLab,一个类似于GitHub的免费的代码平台。可以使用浏览器正常浏览,就像github一样。于是,下面我们在服务器上安装GitLab: 以root用户进行操作 1.安装配置依赖: yum install curl policycoreutils openssh-server openssh-clients systemctl enable sshd systemctl start sshd yum install postfix systemctl enable postfix systemctl start postfix

linux安装git服务器和svn服务器

左心房为你撑大大i 提交于 2019-12-08 12:18:40
linux版本 linux版本为CentOS 6.8 (要注意有些软件的安装方法在各个linux版本之间也是存在差异的) git服务器 git服务器需要提供一个UI供开发人员创建项目管理项目,选择使用gitLab进行管理。 安装方法 gitLab的安装方法有两种,一种是使用集成化安装,直接下载gitLab的安装包,解压安装,一站式傻瓜服务,好处是简单,但是不可自己挑选其中个组件的版本;另一种是逐一安装ruby、mysql、redis等等 其中集成化安装可参考: centos7安装部署gitlab服务器 逐一安装可参考: centos6安装部署git服务器 遇见问题 (1) 端口问题:nginx 不要使用默认的8080端口,因为 unicorn 使用的是8080端口,注意这两个不能重复 (2) 查找问题方法:可使用 gitlab-ctl tail 来查看gitlab的运行日志,包括报错日志 (3) 每次修改gitLab的配置后,需要重新生成配置,重启gitlab(gitlab-ctl reconfigure和gitlab-ctl restart) (4) 初始账户: root 密码: 5iveL!fe svn服务器 svn服务器在linux上目前没有可视化界面进行管理,使用 subversion 进行管理 安装方法 subversion安装方法比较简单,参考: Centos6

How can I know the updated file during the gitlabci pipeline

梦想与她 提交于 2019-12-08 10:36:17
问题 During the gitlab pipeline (triggered after each commit on my branch), I want to know which files are concerned by the commit in order to apply specific bash script regarding each file. I'm currently using the following code in my gitlabci.yaml file: - export DIFF=$(git show --stat HEAD) - ./myBashScript.sh Then I'm using $DIFF in my bash script. But is there a better approach? (I'm using a local gitlab 10.8) 回答1: You can use already existing CI variables to do something like this to retrieve

我的docker随笔5:docker-compose的安装与使用

泄露秘密 提交于 2019-12-08 10:25:04
由前文知,运行容器的命令比较简单,但是,当有复杂的应用时,比如设置环境变量、挂载目录、映射端口,命令就变得比较长了。如果有多个docker镜像同时配置使用的话,单独执行 docker run 会显示比较麻烦。因此,本文就介绍多容器编排的一个简单工具:docker-compose。 安装 安装方法如下: sudo apt -get install -y docker -compose 本文安装的版本如下: $ docker-compose --version docker-compose version 1.21 .2 , build a133471 docker-compose.yml内容 docker-compose默认使用的配置文件为docker-compose.yml,其内容示例如下,大多数英文名称,是固定内容,中文说明是根据实际情况变化的内容。 version: '2' # 固定,表示其版本为2 services: # 固定,表示容器服务 gitlab: # 容器名称,根据实际修改 image: latelee/gitlab # 镜像名,如果不存在,则从网络下载 container_name: gitlab # 容器名,在运行名称是唯一的 restart: always # 开启此选项,在机器重启后,会自动启动这些容器,否则,就要手动启动容器 volumes: #