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 read
permission or read
and write
permission to the repository from which it was created
If your project needs additional permissions for other repositories, you can configure this in the devcontainer.json
file, 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!