I have problem with submodule on github codespace.
When i use command
git submodule update --init
terminal show me
Warning: Permanently added 'github.com,xxxxx' (ECDSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
-
Do you have access rights to that repository? Does it exist?torek– torek2021年12月03日 21:05:43 +00:00Commented Dec 3, 2021 at 21:05
-
this is crazy I'm struggling with the same thing. I found this on the web, I'm trying it out now: github.community/t/how-to-checkout-recursively/136734Sydalmighty– Sydalmighty2022年06月14日 17:02:53 +00:00Commented Jun 14, 2022 at 17:02
-
sse: stackoverflow.com/questions/6031494/…prumand– prumand2023年05月23日 20:06:38 +00:00Commented May 23, 2023 at 20:06
1 Answer 1
Github Codespace manages what they call a Developer Container, which provides a fully featured development environment. Whenever you work in a codespace, you are using a dev container on a virtual machine.
As from documentation:
By default, your codespace is assigned a token scoped with
readpermission orreadandwritepermission to the repository from which it was created
If your project needs additional permissions for other repositories, you can configure this in the
devcontainer.jsonfile, as described in "Setting additional repository permissions"
To set all permissions for a given repository, use "permissions": "read-all" or "permissions": "write-all" in the repository object (the .devcontainer.json file):
// .devcontainer.json
{
"customizations": {
"codespaces": {
"repositories": {
"my_org/my_repo": {
"permissions": "write-all"
}
}
}
}
}
So, through the .devcontainer file one can setup a specific repository dev container to have the required authorization to pull and push it's project submodules repositories!