Changing https-address of submodules in .git/config to ssh-address

前端 未结 2 1513
情深已故
情深已故 2021-01-24 05:01

I need to use ssh forwarding-agent to enable git cloning on remote servers. The repository has submodules which were originally added with their https addresses. In

2条回答
  •  鱼传尺愫
    2021-01-24 05:33

    Use git config --global url..insteadOf to substitute URLs on the fly. Something like

    git config --global url..insteadOf git@:/.git
    

    See more examples in https://stackoverflow.com/search?q=%5Bgit-submodules%5D+insteadof

提交回复
热议问题