Code Ocean generates the information you configured in the Environment Editor into a Dockerfile. If you are familiar with Dockerfile, you can unlock it and edit it directly.
This will disable the Environment Editor UI unless you reset the Dockerfile.
Notice the lines 6-8 in the Dockerfile. This allows you to use the git credential while you build your environment.