自建git服务器修改ssh端口后客户端配置

服务器上修改了ssh端口,本地git push被拒,查了一下,全是github上怎么改成https方式的办法。。。你们就没有人自己建git服务器吗?闲置的VPS送给我啊。。。

自己动手,丰衣足食,其实也很简单,

首先,.ssh/config里增加一段:

# gitolite server
Host mygitserver
    HostName 111.222.11.22
    Port 11111
    User git

然后,到项目目录下,.git/config里,修改你的IP地址或原host为:

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
        precomposeunicode = true
[remote "origin"]
        url = mygitserver:myproject
        fetch = +refs/heads/*:refs/remotes/origin/*
git 22端口
阅读(1039) 评论(0) 2019-03-07
输入类似这样的地址 "name@something.com"
输入类似这样的地址"http://someaddress.com"
验证码 不区分大小写(看不清)