Git Submodule - Permission Denied

后端 未结 9 1226
长发绾君心
长发绾君心 2021-02-03 20:44

I am not able to clone the submodule existing within my private git repository. I do have access to entire repository,

Have used the below commands but dint work, pleas

相关标签:
9条回答
  • 2021-02-03 21:42

    Had the same problem with TortoiseGit / Windows subsystem for Linux / GitBash. The solution is to use authentication via an agent (key) instead of password.

    For TortoiseGit:

    • run Pageant
    • add your key
    • enter password
    • TortoiseGit menu -> submodule update ...

    (without pageant git clone it asks for password and works as intended, but git update fails with error)

    For WS4L:

    $ eval `ssh-agent -s`
    $ chmod 600 /path/to/key
    $ ssh-add /path/to/key
    

    proceed with git submodule update

    0 讨论(0)
  • 2021-02-03 21:42

    Win10 + git bash terminal in VS Code. In my case, I was using git bash through VS Code. When using submodules, git pops up a window to enter pass phrase for the key. Bash through VSCode would't pop this up. With the windows Context menu item, "Git Bash Here" in the repo folder as shown below: Context menu Screen Grab

    git submodule update
    

    works splendidly.

    0 讨论(0)
  • 2021-02-03 21:43

    Interestingly, in a similar occasion using the HTTPS link worked for me.

    0 讨论(0)
提交回复
热议问题