
Git/GitLab
乐之终曲
技术很多,路还很长
展开
-
GitLab 之 Windows 安装并配置 Git 环境变量
下载并安装git:https://git-scm.com/downloads1.右击我的电脑 ->属性 ->高级系统设置->高级->环境变量2.将git下bin文件夹的路径添加到Path里,确定保存3.打开cmd,输入git回车配置完成4.设置git全局用户名和邮箱git config --global user.name "xxxx...原创 2018-12-21 16:49:16 · 3382 阅读 · 3 评论 -
GitLab 之 详细部署配置,以及遇到的一些问题
1. 安装依赖软件yum -y install policycoreutils openssh-server openssh-clients postfix2.设置postfix开机自启,并启动,postfix支持gitlab发信功能systemctl enable postfix && systemctl start postfix3.下载gitlab安装包,...原创 2018-12-17 10:14:04 · 3036 阅读 · 2 评论 -
GitLab 之 GitLab-Runner 安装,配置与问题汇总
ps:gitlab-runner和gitlab不需要在同一台机器上。。。1. 安装CentOS安装:添加GitLab的官方存储库curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | sudo bash安装最新版本的GitLab Runner,或...原创 2018-12-20 17:52:25 · 1464 阅读 · 0 评论 -
Gitlab 之 IDEA 上 Git 配置
注:此方法可用于配置gitlab也可用于配置github1.在github中创建一个账号:https://github.com/join?source=header-home2.下载并安装git:https://git-scm.com/downloads一路NEXT下去安装完事3.安装成功后打开Git Bash,输入下列命令,设置git全局用户名和邮箱git config -...原创 2018-12-17 11:17:36 · 241 阅读 · 0 评论 -
Gitlab 之 命令行提交代码到 git
每次都要查一遍太麻烦了,记下来下次直接 copy#初始化,没装 git 的要装git init#移除原来的源(可选)git remote rm origin#添加源git remote add origin git@xx.xx.xx.xxx:xxxx/xxxx.git#添加所有文件git add .#提交到本地仓库git commit -m "Initial commit"...原创 2019-02-25 16:54:25 · 517 阅读 · 0 评论 -
Gitllab 之 IDEA 提交代码到 Gitlab
1.创建新项目并提交到远程Git仓库2.先添加,然后提交3.commit and push4.点击Define remote后,在弹出的窗口输入远程仓库地址,确认5.成功原创 2018-12-17 16:30:28 · 729 阅读 · 0 评论 -
GitLab 之 历史版本回退
1.查看提交记录,获得版本号git log2.本地回退到相应的版本注意使用 --hard 参数会抛弃当前工作区的修改使用 --soft 参数的话会回退到之前的版本,但是保留当前工作区的修改,可以重新提交git reset --hard <版本号>3.为了覆盖掉远端的版本信息,使远端的仓库也回退到相应的版本,需要加上参数--forcegit ...原创 2018-12-26 11:15:10 · 17937 阅读 · 1 评论 -
GitLab 之 Rebase 导致本地代码丢失,进行还原
GitLab 之 Rebase 导致本地代码丢失,进行还原问题描述解决方案查看提交的历史记录回滚操作问题描述写了两天的代码,进行提交时发现冲突了,结果手贱点了 Rebase 结果发现本地代码全没了解决方案查看提交的历史记录–date=iso: 是为了打印时间,这样好通过时间判断哪个是提交的git reflog --date=iso我是通过提交时间,加上 Rebase 这个操作判断这个时间点是我要撤回的本地提交的时间点回滚操作之后旧发现代码成功变回去了git reset --hard原创 2020-08-18 11:28:24 · 3858 阅读 · 1 评论 -
Gitlab 之 分支的使用说明
1.创建分支点击加号→ New branch输入分支名,然后创建分支然后项目里就可以看到分支了2.提交代码到分支首先现在本地创建分支右击项目 → Git→ Repository→ Branches然后创建一个同名分支,然后分支就有了然后依然是先Commit 再 Push,可以看到已经切换到分支了,然后提交3.将分支合并...原创 2018-12-25 14:34:31 · 3210 阅读 · 0 评论 -
Git 克隆指定分支的代码
原因:今天拉取 vue-element-admin遇到这个情况,咋还有这种操作克隆步骤:获取你需要的项目的分支名:如 i18n克隆项目:# 格式:git clone -b <分支名> <URL>git clone -b i18n https://github.com/PanJiaChen/vue-element-admin.git-b...原创 2019-09-02 16:27:42 · 882 阅读 · 0 评论 -
Gitlab Root 密码忘记了,修改密码
#进入gitlab控制台[root@gitlab ~]# gitlab-rails console productionLoading production environment (Rails 4.2.8)#获取第一个用户,可以看到第一个默认为 rootirb(main):001:0> user = User.where(id:1).first=> #<User ...原创 2019-03-26 14:19:06 · 6090 阅读 · 0 评论 -
Gitlab 之 YAML 相关关键字与概念解析
概念 Job YAML 文件使用一系列约束叙述定义了 Job 启动时所要做的事情。Job 被定义为具名的顶级元素,并且至少包括一条脚本语句。Job 被 Runner 拿到并在 Runner 的环境下执行。重要的是,每个 Job 都会与其他 Job 分离开来,独立进行。如: job1: script: "execute-script-for-job1" job2:...转载 2018-12-26 13:38:37 · 2827 阅读 · 0 评论 -
Gitlab 之 结合 Docker 持续集成
思路:1.编写.gitlab-ci.yml 文件2.通过 yml 文件调用 sh 脚本sh:1.打包 clone 的项目2.创建 Dockerfile 文件生成镜像3.上传镜像到 docker 以便拉取镜像4.创建 k8s 配置文件(如果没有用 k8s 的,那也很容易,直接删除容器,运行就好了)5.删除 k8s 服务,然后启动.gitlab-ci.yml :...原创 2019-02-12 11:40:04 · 410 阅读 · 0 评论 -
Gitlab 之 Windows 环境进行 tomcat 持续集成部署,包含项目打包,备份,部署以及问题
问题:之前在用 Gitlab 在 windows 上做持续集成时候遇到了问题,也有问一些认识的人,但是他们都表示没听懂没遇到过。我之前的部署流程:Gitlab-runner 拉取代码 ➡ Ant 打包➡ 项目复制到 tomcat 的 webapps 下面➡ 最后 startup.bat 启动结果:Gitlab 的任务无法完成,会一直在进行,可能是因为直接去启用了startup.bat...原创 2019-09-02 09:57:47 · 751 阅读 · 4 评论 -
Gitlab external_url 路径问题及解决方案
遇到如下问题:解决方法:vi /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.ymlhost可以换成域名,port更改为gitlab服务的端口然后运行gitlab-ctl restart不要运行gitlab-ctl reconfigure 运行了,配置又还原回去了...原创 2019-01-24 12:39:44 · 29047 阅读 · 11 评论 -
Gitlab 日志位置记录
Gitlab 日志位置记录日志位置日志位置gitlab会将所有的操作记录成日志,方便进行分析,gitlab的日志系统分为以下几类:production.log: 该日志位于 /home/gitlab/logs/gitlab-rails 中,其作用是记录gitlab的每次请求的具体信息,包括请求的URL、ip地址、请求类型、以及此次请求所涉及的具体代码、SQL请求以及SQL请求消耗的时间。比如:application.log: 此日志文件位于 /home/gitlab/logs/gitlab-转载 2020-12-04 15:38:01 · 10611 阅读 · 1 评论 -
Unable to connect to the server: x509: certificate signed by unknown authority
unable to recognize "csis-service.yaml": Get https://xx.xx.xxx.xxx:xxxx/api?timeout=32s: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while try...原创 2019-03-04 11:17:30 · 3886 阅读 · 0 评论 -
sudo: no tty present and no askpass program specified
[INFO] Scanning for projects...[WARNING] [WARNING] Some problems were encountered while building the effective model for com.springboot:test:jar:0.0.1-SNAPSHOT[WARNING] 'build.plugins.plugin.versi...原创 2019-01-25 11:35:02 · 1016 阅读 · 0 评论