最佳答案
我正在为一个远程存储库设置我的本地 git 项目。远程存储库在一个非标准端口(4019)上服务。
但是它不起作用,相反,我得到了下面的错误消息:
ssh: connect to host git.host.de:4019 port 22: Connection refused
fatal: The remote end hung up unexpectedly
error: failed to push to 'ssh://root@git.host.de:4019/var/cache/git/project.git'
我的本地 git 配置是 如下所示:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = ssh://root@git.host.de:4019/var/cache/git/project.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
(端口和主机是实际端口和主机的占位符。)
我的 git 配置出了什么问题?