zoukankan      html  css  js  c++  java
  • centos下git报错Failed to connect to repository : Command "git ls-remote -h HEAD" returned status code 128:

    Failed to connect to repository : Command "git ls-remote -h HEAD" returned status code 128:
    stdout:
    stderr: fatal: repository 'http://ytgit.chinasoft.cn/chinasoft/innerapi.git/' not found


    # 通过在git 服务器上进行clone项目报错如下
    # git clone http://ytgit.chinasoft.cn/chinasoft/innerapi.git
    Cloning into 'innerapi'...
    fatal: repository 'http://ytgit.chinasoft.cn/chinasoft/innerapi.git/' not found

    # git clone git@ytgit.chinasoft.cn:chinasoft/innerapi.git
    Cloning into 'innerapi'...
    GitLab: The project you were looking for could not be found.
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.


    经过搜索发现是本地git配置和仓库里的 .git/config 不一致


    # 远程仓库配置
    # more maxserver/.git/config
    [core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
    [remote "origin"]
        url = http://ytgit.chinasoft.cn/chinasoft/maxserver.git
        fetch = +refs/heads/*:refs/remotes/origin/*
    [branch "master"]
        remote = origin
        merge = refs/heads/master

    本地配置:
    # git config --list
    user.password=chinasoft1234
    user.email=chengjn@chinasoft.cn
    credential.helper=store


    # 修改本地配置后问题解决
    [root@sz_yt_jenkins01_12_99 ~]# cat .gitconfig
    [user]
        #password = chinasoft1234
        #email = chengjn@chinasoft.cn
    [credential]
        helper = store
    [root@sz_yt_jenkins01_12_99 ~]# cat .git-credentials
    http://yt_release_deployment:SgKHNzqV5gGDhXs@ytgit.chinasoft.cn
    #http://chengjn:chinasoft1234@ytgit.chinasoft.cn
    #http://chengjn:chinasoft1234@ytgit.chinasoft.cn

  • 相关阅读:
    MES取所有部门的函数实例
    MES总结:CBF.Common 文件Net下的有类型转换
    LINQ to SQL 系列 如何使用LINQ to SQL插入、修改、删除数据
    c# abstract抽象类与继承类子类的构造函数_base
    C# 之泛型详解
    MVC6与Asp.net5
    MenuStrip菜单递归
    .net 下的MVCPager
    UVALive5461 UVA615 POJ1308 HDU1325 Is It A Tree?
    UVALive5461 UVA615 POJ1308 HDU1325 Is It A Tree?
  • 原文地址:https://www.cnblogs.com/reblue520/p/14974304.html
Copyright © 2011-2022 走看看