You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This extensions does not handle credentials or authentication details. In order to connect to a remote host, it is recommended to use SSH.
65
+
If you are seeing errors similar to `[E yyyy-mm-dd hh:mm:ss ServerApp] 500 POST /git/<clone|push|pull|status>` on the console which is running the JupyterLab server, you probably need to set up a credentials store for your local Git repository.
66
66
67
-
If you are seeing errors similar to `[E yyyy-mm-dd hh:mm:ss ServerApp] 500 POST /git/<clone|push|pull|status>` on the console which is running the JupyterLab server, you probably need to set up a credentials store for your local Git repository. One of the possibility is to use SSH.
67
+
This extension tries to handle credentials for HTTP(S) connections (if you don't have set up a credential manager). But not for other SSH connections.
68
68
69
-
Here are the steps to follow (skip any that is already accomplished for your project):
69
+
> For Windows users, it is recommended to install [git for windows](https://gitforwindows.org/). It will automatically set up a credential manager.
70
+
> In order to connect to a remote host, it is recommended to use SSH.
71
+
72
+
#### HTTP(S) protocol
73
+
74
+
The extension can cache temporarily (by default for an hour) credentials. To use the caching, you will need to
75
+
check the option _Save my login temporarily_ in the dialog asking your credentials.
76
+
77
+
> You can set a longer cache timeout; see [Server Settings](#server-settings).
78
+
79
+
> This is a new feature since v0.37.0
80
+
#### SSH protocol
81
+
82
+
Here are the steps to follow to set up SSH authentication (skip any that is already accomplished for your project):
70
83
71
84
1.[Create a SSH key](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)
72
85
2. Register the public part of it to your Git server:
@@ -94,25 +107,35 @@ Once installed, extension behavior can be modified via the following settings wh
94
107
95
108
### Server Settings
96
109
97
-
- Post _git init_ actions: It is possible to provide a list of commands to be executed in a folder after it is initialized as Git repository.
98
110
99
-
In `~/.jupyter/jupyter_notebook_config.py`:
111
+
-`JupyterLabGit.actions.post_init`: Set post _git init_ actions.
112
+
It is possible to provide a list of commands to be executed in a folder after it is initialized as Git repository.
113
+
-`JupyterLabGit.credential_helper`: Git credential helper to set to cache the credentials.
114
+
The default value is `cache --timeout=3600` to cache the credentials for an hour. If you want to cache them for 10 hours, set `cache --timeout=36000`.
115
+
116
+
<details>
117
+
<summary><b>How to set server settings?</b></summary>
118
+
119
+
In `$HOME/.jupyter/jupyter_notebook_config.py` (on Windows `%USERPROFILE%/.jupyter/jupyter_notebook_config.py`):
Or equivalently in `jupyter_notebook_config.json`:
126
+
Or equivalently in `$HOME/.jupyter/jupyter_notebook_config.json` (on Windows `%USERPROFILE%/.jupyter/jupyter_notebook_config.json`):
106
127
107
128
```json
108
129
{
109
130
"JupyterLabGit": {
110
131
"actions": {
111
132
"post_init": ["touch dummy_init.dat"]
112
-
}
133
+
},
134
+
"credential_helper": "cache --timeout=3600"
113
135
}
114
136
}
115
137
```
138
+
</details>
116
139
117
140
## Troubleshoot
118
141
@@ -125,7 +148,7 @@ jupyter labextension list
125
148
126
149
If they do not match or one is missing, please [reinstall the package](README.md#Install).
127
150
128
-
-**Issue**: the Git panel does not recognize that you are in a Git repository.
151
+
<details><summary>the Git panel does not recognize that you are in a Git repository.</summary>
129
152
130
153
Possible fixes:
131
154
@@ -141,8 +164,10 @@ If they do not match or one is missing, please [reinstall the package](README.md
141
164
```
142
165
143
166
- If you are using JupyterHub or some other technologies requiring an initialization script which includes the jupyterlab-git extension, be sure to install both the frontend and the server extension **before** launching JupyterLab.
167
+
</details>
144
168
145
-
- **Issue**: the Git panel is not visible.
169
+
<details>
170
+
<summary>the Git panel is not visible.</summary>
146
171
147
172
Possible fixes:
148
173
@@ -160,6 +185,7 @@ If they do not match or one is missing, please [reinstall the package](README.md
160
185
161
186
If you see `@jupyterlab/git` under `Uninstalled core extensions: `, your installation may have been corrupted. You can run `jupyter lab clean --all` and
0 commit comments