You can set your GitHub username and password as environment variables. This way, you don't need to enter these details every time you want to push to or pull from a GitHub repository. Before setting up this specific integration, make sure you understand how to set up and connect integrations to your workspace as explained here.
You can set the necessary environment variables as follows. Pay attention to the names of the environment variables; these should be GIT_COMMITTER_EMAIL, GIT_COMMITTER_NAME, GIT_PASSWORD andGIT_USERNAME. You can choose the integration name.
For the GIT_PASSWORD, create a personal access token (PAT) with the right permissions as described in the GitHub documentation.
After configuring and connecting the integration, you can now open up a terminal in JupyterLab and clone a private repository for example. Make sure to use the web URL of the GitHub repository, starting with https://: