optimism-integration icon indicating copy to clipboard operation
optimism-integration copied to clipboard

Permission denied when cloning submodules

Open tina1998612 opened this issue 4 years ago • 1 comments

Steps to reproduce:

  • Run sudo git clone https://github.com/ethereum-optimism/optimism-integration.git --recurse-submodules

Environment:

  • Ubuntu 18.04 Windows Subsystem for Linux

image

Thank you for your help in advance:)

tina1998612 avatar Jan 20 '21 01:01 tina1998612

You should be careful running commands with sudo if you do not need to. The problem is that you do not have an ssh key configured with github. To solve the problem, either add an ssh key to github or run these commands to clone using https instead of ssh:

$ git clone https://github.com/ethereum-optimism/optimism-integration.git
$ cd optimism-integration
$ sed -i -Ee's#[email protected]:([^/]*)/(.*).git#https://github.com/\1/\2.git#' .gitmodules
$ git submodule update --init --recursive

tynes avatar Jan 20 '21 01:01 tynes