• gitlab 10安装


    电脑环境:centos6.2+gitlab10.0

    gitlab10.0 (gitlab-ce-10.0.0-ce.0.el6.x86_64.rpm)下载地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/

    步骤1:配置系统防火墙,把HTTP和SSH端口开放

    sudo yum install curl openssh-server postfix cronie
    sudo service postfix start
    sudo chkconfig postfix on
    sudo lokkit -s http -s ssh

    步骤2:开始安装

    sudo rpm -ivh gitlab-ce-10.0.0-ce.0.el6.x86_64.rpm 

    步骤3:保存配置

    sudo gitlab-ctl reconfigure

    步骤4:启动

    sudo gitlab-ctl start

    安装过程中遇到的错误:502错误(排除端口冲突,在网上看到好多是因为端口冲突引起的),解决方法

    /opt/gitlab/embedded/bin/gitlab-workhorse -listenNetwork unix -listenUmask 0 -listenAddr 
    /var/opt/gitlab/gitlab-workhorse/socket -authBackend http://localhost:8080 -authSocket 
    /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket -documentRoot 
    /opt/gitlab/embedded/service/gitlab-rails/public -pprofListenAddr
    gitlab-ctl restart

    一些常用命令:

    Git 全局设置
    git config --global user.name "****"
    git config --global user.email "*****@163.com"
    创建新版本库
    git clone http://192.168.1.10/lvlv/TestGit.git
    cd TestGit
    touch README.md
    git add README.md
    git commit -m "add README"
    git push -u origin master
    已存在的文件夹
    cd existing_folder
    git init
    git remote add origin http://192.168.1.10/lvlv/TestGit.git
    git add .
    git commit -m "Initial commit"
    git push -u origin master
    已存在的 Git 版本库
    cd existing_repo
    git remote add origin http://192.168.1.10/lvlv/TestGit.git
    git push -u origin --all
    git push -u origin --tags

    解决git本地仓库与远程仓库关联出现 failed to push some refs to git的问题

    git pull --rebase origin master
    
    git push -u origin master

    atal: parameter inet_interfaces: no local interface found for 127.0.0.1

    发现配置为:

    inet_interfaces = localhost

    inet_protocols = all

    改成:

    inet_interfaces = all

    inet_protocols = all


    重新启动就ok了

    service postfix start

  • 相关阅读:
    iOS基础教程:在建好的项目中加入CoreData[转]
    iOS开发--使用lipo命令制作模拟器与真机通用静态库
    Linux命令之du
    简单了解gzip、bzip2、xz
    Linux命令之rpm
    进入CentOS7紧急模式恢复root密码
    解决Linux用户模板文件被删除后显示不正常问题
    Linux修改用户基本信息(不含密码)
    Linux用户密码文件/etc/shadow相关
    SecureCRT、Xmanager对Linux上传下载文件或文件夹
  • 原文地址:https://www.cnblogs.com/lvlv/p/9151851.html
Copyright © 2020-2023  润新知