To install and activate the server extension, follow the steps mentioned here:
- Install the server extension using pip in the Terminal, and then enable it using the following command:
pip install jupyterlab-gitlab
- If you are running notebook 5.3 or later, this will automatically enable the extension. If it doesn't, then enable the server extension by running the following command:
jupyter serverextension enable --sys-prefix jupyterlab_gitlab
- To check whether the server extension is enabled, run the following command:
jupyter serverextension list
- Now, you can add the credentials you got from GitLab to your notebook configuration file. Instructions for generating a configuration file can be found here: https://jupyter-notebook.readthedocs.io/en/stable/config_overview.html#configure-nbserver. Once you have identified this file, add the following line to it:
c.GitLabConfig.access_token = "< YOUR_ACCESS_TOKEN >"
In the preceding command, < YOUR_ACCESS_TOKEN > is the string value you obtained previously.