gitlab

How to serve other vhosts next to Gitlab Omnibus server? [Full step-by-step solution]

情到浓时终转凉″ 提交于 2019-12-17 15:30:03
问题 I installed Gitlab CE on a dedicated Ubuntu 14.04 server edition with Omnibus package . Now I would want to install three other virtual hosts next to gitlab. Two are node.js web applications launched by a non-root user running on two distinct ports > 1024 , the third is a PHP web application that need a web server to be launched from. There are: a private bower registry running on 8081 ( node.js ) a private npm registry running on 8082 ( node.js ) a private composer registry ( PHP ) But

记一次oom内核优化记录:vm.lower_zone_protection

為{幸葍}努か 提交于 2019-12-17 11:09:13
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 情景 最近gitlab服务会偶发性500,当前机器部署了gitlab、nfs等服务,经过排查发现是nfsd引发oom,导致系统运行不畅。处理过程如下: 事故现场 开发在使用gitlab的时候发现,偶发性的出现500: 排查 检查gitlab日志,没有发现明显的异常; 检查监控: 根据监控可以发现,有几个时间点内存有较大变化。 根据以上时间节点查看系统日志,发现: 当前时间点nfs引发系统oom。 查找解决办法 类似问题: https://www.cyberciti.biz/tips/linux-oom-killer-out-of-memory-and-nfs-server-optimization.html 追根溯源: https://blog.csdn.net/fengda2870/article/details/12038419 通过上面两篇文章搞清楚了原因,修复如下: # 增加如下配置: $ vim /etc/sysctl.conf # 预留系统保护内存为500M(该值根据自己具体使用环境设定) vm.lower_zone_protection = 500 # 生效最新配置 $ sysctl -p 补充 关于lower_zone_protection和lowmem_reserve_ratio: http:

docker for windows 部署gitlab

孤者浪人 提交于 2019-12-17 08:03:47
gitlab的安装相对繁琐,如果使用docker 镜像的方式就轻松太多了。 我是用的环境是windows10 专业版 + docker for windows 1.右键docker打开Kitematic,过滤gitlab镜像,我使用的是gitlab-ce进行安装,安装启动的过程可能时间稍微长一些,多等一会 等看到这个界面,就表示安装成功 可以查看settings->Hostname/ports 22 对应的ssh,80对应的是http 443 对应的是https, 直接点击localhost:32775 就可以访问web管理界面,进入管理界面后进行Group与Project 配置,需要注意的是 在进行仓库的地址,不要被迷惑,需要对应端口,基本格式: http://192.168.1.253:32775/CPMS/CPMS.git 根据自己的ip与项目进行修改 使用http进行版本控制比较简单,但是相对不够安全,如果要使用git就更加要注意了: 1.生成秘钥 2.拷贝公钥的内容,在服务器中填写SSH Keys 3. 在客户端的.ssh 文件夹中,也就是秘钥存放的目录中,添加config文件 config内容: #多远程仓库配置文件 #配置Github Host github.com HostName github.com IdentityFile C:\Users

Fix GitLab error: “you are not allowed to push code to protected branches on this project”?

谁说我不能喝 提交于 2019-12-17 08:02:26
问题 I have a problem when I push my codes to git while I have developer access in my project, but everything is okay when I have master access. Where is the problem come from? And how to fix it? Error message: error: You are not allowed to push code to protected branches on this project. ... error: failed to push some refs to ... 回答1: there's no problem - everything works as expected. In GitLab some branches can be protected. By default only Maintainer/Owner users can commit to protected branches

error: RPC failed; curl transfer closed with outstanding read data remaining

限于喜欢 提交于 2019-12-17 06:21:24
问题 I try to clone a repository from GitLab (GitLab 6.6.2 4ef8369) and error: remote: Counting objects: 66352, done. remote: Compressing objects: 100% (10417/10417), done. error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed How to avoid this error? 回答1: It happens more often than not, I am on a slow internet connection and I have to clone a decently-huge git repository. The most common

gitlab首次推送本地代码

元气小坏坏 提交于 2019-12-17 05:57:19
1、在gitlab上创建仓库 2、在本地搭建项目框架 3、git init //初始化本地仓库 4、git add . //首次添加变动到本地暂存区 git commit -m "first push" //首次提交本地暂存区文件到本地仓库区 5、git remote add <remote-name> <remote-url> //添加远程仓库地址到本地仓库 6、git fetch <remote-name> //下载远程仓库所有变动 7、git branch -a //查看本地和远程所有分支 8、git branch --track <branch> <remote-branch> //建立本地仓库分支并与远程仓库分支建立一一对应关系 9、git branch -vv //查看所有分支以及追踪关系 10、git push -f <remote> --all //强行推送所有分支所有文件到远程仓库所有分支 11、git pull <remote-name> master --allow-unrelated-histories //合并两个独立启动的仓库的历史 来源: CSDN 作者: 糯米控 链接: https://blog.csdn.net/weixin_42338584/article/details/103566858

Gitlab repository mirroring

天涯浪子 提交于 2019-12-17 02:41:30
问题 Is it possible to have gitlab setup to automatically sync (mirror) a repository hosted at another location? At the moment, the easiest way I know of doing this involves manually pushing to the two (gitlab and the other) repository, but this is time consuming and error prone. The greatest problem is that a mirror can resynchronize is two users concurrently push changes to the two different repositories. The best method I can come up with to prevent this issue is to ensure users can only push

docker搭建gitlab、Redmine

喜你入骨 提交于 2019-12-17 01:50:00
本地使用windows,setting里面切换至linux 从Docker图标的右键菜单中选中 “Switch to Linux containers ...” Docker Engine运行在Linux容器模式 打开PowerShell,CMD ‘PowerShell’进入 查看docker环境:docker version 确认ok后使用以下命令搭建gitlab,他的运行环境主要由三部分组成 postgresql数据库 redis缓存服务 gitlab服务 使用 sameersbn/docker-gitlab来搭建GitLab服务,项目地址是https://github.com/samneersbn/docker-gitlab docker run --name gitlab-postgresql -d --env 'DB_NAME=gitlabhq_production' --env 'DB_USER=gitlab' --env 'DB_PASS=password' sameersbn/postgresql:9.4-12 docker run --name gitlab-redis -d sameersbn/redis:latest docker run --name gitlab -d --link gitlab-postgresql:postgresql --link

gitolite 向 gitlab 迁移

拟墨画扇 提交于 2019-12-16 12:16:26
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 2.5.1. gitolite 向 gitlab 迁移 早期gitlab使用gitolite为用户提供SSH服务,新版gitlab有了更好的解决方案gitlab-shell。安装新版本是必会涉及gitolite 向 gitlab 迁移,下面是我总结的一些迁移经验。 第一步,将gitolite复制到gitlab仓库目录下 # cp -r /gitroot/gitolite/repositories/* /var/opt/gitlab/git-data/repositories/ 执行导入处理程序 # gitlab-rake gitlab:import:repos 上面程序会处理一下目录结构,例如 进入gitlab web界面,创建仓库与导入的仓库同名,这样就完成了导入工作。 提示 转换最好在git用户下面操作,否则你需要运行 # chown git:git -R /var/opt/gitlab/git-data/repositories 来源: oschina 链接: https://my.oschina.net/u/725072/blog/406731

gitlab的仓库迁移到新的gitlab

混江龙づ霸主 提交于 2019-12-16 12:13:08
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 下载原有gitlab源码 git clone http://gitlab.**.com/projectName gitlab地址替换成为新gitlab地址 git remote set-url origin http://gitlab.**.com/newProjectName 本地推送到远程-可以在sourceTree中进行推送 git push origin --all 推送主干和分支 git push --tags 推送标签 查看远程gitlab地址 git remote -v master版本回退 将master分支移除protected分支 git reset --hard 版本号 或者 sourceTree选择’将master重置到本次提交’,选择‘强行合并’ git push -u origin master -f 还可以通过镜像的方式迁移 克隆老项目的镜像 git clone --mirror old.git (old.git 为老项目的git地址) 进入项目目录 cd old.git 老项目的地址替换成新项目 git remote set-url --push origin new.git (new.git 为新项目的git地址) 将镜像推到远程 ---------------------