Using a remote repository with non-standard port

前端 未结 5 1732
面向向阳花
面向向阳花 2020-11-27 11:22

I am setting up my local git project for a remote repository. The remote repository is being served on a non-standard port (4019).

But it doesn\'t work. Instead I ge

5条回答
  •  忘掉有多难
    2020-11-27 11:35

    This avoids your problem rather than fixing it directly, but I'd recommend adding a ~/.ssh/config file and having something like this

    Host git_host
    HostName git.host.de
    User root
    Port 4019
    

    then you can have

    url = git_host:/var/cache/git/project.git
    

    and you can also ssh git_host and scp git_host ... and everything will work out.

提交回复
热议问题