zoukankan      html  css  js  c++  java
  • 本地拉取gitlab上的项目(docker+gitlab的配置),报错:fatal: Could not read from remote repository

    环境配置:centos7+docker+gitlab

    一、出现的问题

    ssh配置成功,本地拉取gitlab项目报错

    lucky@luckydeMacBook-Pro ~ % git clone git@81ca3f292881:Syw/daas_interface_test.git
    Cloning into 'daas_interface_test'...
    ssh: Could not resolve hostname 81ca3f292881: nodename nor servname provided, or not known
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    lucky@luckydeMacBook-Pro ~ %

    注:快速的处理方案:将81ca3f292881 改为172.16.58.134:8070(gitlab的地址)即可clone成功

      注意:当gitlab新创建项目时,项目地址会自动获取一个gitlab服务器的IP地址

     

    二、解决方法:(修改这个IP地址,让其成为正确的IP地址)

    1、登录服务器(这里我是自己的虚拟机)

    2、打开终端,进入docker容器,在容器中执行执行命令

    docker exec -it gitlab1 bash

    3、进入到gitlab的配置文件中

    cd   /opt/gitlab/embedded/service/gitlab-rails/config

    4、修改 gitlab.yml 文件

    vim gitlab.yml

     注意:若在docker中给gitlab配置了端口,此处也需要添加端口信息

    5、重启gitlab ,使之生效

    gitlab-ctl restart

    6、查看结果

      

      

  • 相关阅读:
    01-移动端 REM 适配(postcss-pxtorem,lib-flexible的使用)
    19-webpack性能优化集锦
    10-map/WeakMap/WeakSet的使用场景
    03-web worker vue项目实战
    ELFhash
    哈希查找
    Logger之Logger.getLogger(CLass)使用(转载)
    mybatis中多对一查询
    IDEA中无法打开查看log文件解决方案
    Self-Supervised Scene De-occlusion(转载)
  • 原文地址:https://www.cnblogs.com/syw20170419/p/13273036.html
Copyright © 2011-2022 走看看