Skip to content

Add remote update support#342

Open
ctriquet-cs wants to merge 1 commit intojupyterhub:mainfrom
CS-SI:manage_remote
Open

Add remote update support#342
ctriquet-cs wants to merge 1 commit intojupyterhub:mainfrom
CS-SI:manage_remote

Conversation

@ctriquet-cs
Copy link
Copy Markdown

Cloning a Git repository for an authenticated server can be achieved with a repository URL of the form "https://login:token@hostname/path.git". When using an token with a limited validated period, the initial cloning with nbgitpuller is successful, but subsequent synchronizations fails. Indeed, the initial token was stored into local repository settings and is no more valid and the new one transmitted by a new call to nbgitpuller is ignored.

That PR proposes to update the repository remote URL before an repository update.

That change is done if required and only URL credentials are updated, hostname and repository path can't be updated.

@ctriquet-cs
Copy link
Copy Markdown
Author

Just re-based that PR on current main.

@jnywong
Copy link
Copy Markdown
Member

jnywong commented Jan 26, 2026

Hey @ctriquet-cs ! I know it's been a long time but thanks for making this PR.

In general, I would not paste tokens into URLs since they are logged on the server and so anyone with access to the server logs can see your private token.

I've opened a PR to document this warning in #387 and suggested an alternative approach using https://github.com/yuvipanda/git-credential-helpers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants