How to use SSH instead of HTTP for Git submodules?

后端 未结 2 1152
遥遥无期
遥遥无期 2021-01-12 17:12

Why are people having this problem?

$ git clone --recursive git@github.com:acani/Chats.git Cloning into \'Chats\'... Permission denied (publickey). fatal: Could not

2条回答
  •  没有蜡笔的小新
    2021-01-12 17:17

    As a workaround, you can try using https url for any github repo:

    cd myParentRepo
    git config url.https://github.com/.insteadOf ssh://git@github.com/
    # or
    git config url.https://github.com/.insteadOf git@github.com:
    

提交回复
热议问题