Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clarifications about git in README #81

Merged
merged 3 commits into from
Oct 6, 2022

Conversation

DimitarVanguelov
Copy link
Contributor

Per discussion with @pankgeorg on Slack, opening this PR to document the issue described below. Per his request, I'm adding it as a part of a new FAQ section. Unfortunately, not sure what else to put in here at the moment, so perhaps we can have this as a living PR until the FAQ section gets sufficiently fleshed out.

The original issue: our git platform (CodeCommit) requires re-authentication several times per 24-hour period. This is a problem when PlutoSliderServer is watching a different repo than the one holding the code for the server as it crashes the Julia git client (even though it keeps the systemd service going). The result is that no new notebooks or changes get picked up the service.

The workaround is to set the JULIA_PKG_USE_CLI_GIT environment variable to true (thanks to @alecloudenback for suggesting this fix).

@alecloudenback
Copy link

I would maybe phrase it more generally: ie that if your git installation or remote requires special configuration or authentication, then try using CLI git instead of bundled.

@fonsp
Copy link
Member

fonsp commented Sep 1, 2022

Thanks!

@fonsp
Copy link
Member

fonsp commented Sep 1, 2022

Maybe we should recommend this to everyone and add the line export JULIA_PKG_USE_CLI_GIT=true in the tutorial. Is there any reason not to use it? @alecloudenback

@pankgeorg
Copy link
Member

Maybe we should recommend this to everyone and add the line export JULIA_PKG_USE_CLI_GIT=true in the tutorial. Is there any reason not to use it? @alecloudenback

let's use it all the time, LibGit2 has a number of issues the CLI git doesn't. The only reason not to use it is if the underlying machine has no git installed at all. We should probably note that users need to make sure the git command works on the host machine.

@alecloudenback
Copy link

I don't know the full history, but if git started being bundled with Julia because CLI git had issues, that suggests there's some solid reason for having bundled git.

I think the issues @DimitarVanguelov first mentioned were due to non-standard git configuration settings in our environment, so may not be an issue for (most?) other users.

@pankgeorg
Copy link
Member

pankgeorg commented Sep 1, 2022

JuliaLang/Pkg.jl#2679

This gives some insight. I can confirm from personal experience that GitHub is also susceptible to issues with libgit2

@DimitarVanguelov
Copy link
Contributor Author

DimitarVanguelov commented Sep 2, 2022

@pankgeorg thanks, very informative discussion in that thread. Obviously not my call, but I am in favor of your suggestion and advising users to make sure to set that env variable and to make sure git is installed on the system. Given the PlutoSliderServer's use case, I don't think that's a big ask.

I can amend the PR and take out the FAQ section. My initial idea was just to have a sentence or two using git CLI, not an FAQ (I certainly don't have enough material for one, though I'm sure one would be good to have eventually).

@fonsp
Copy link
Member

fonsp commented Sep 3, 2022

Alright, let's go with setting the ENV variable for all users, @DimitarVanguelov can you update the PR to put export JULIA_PKG_USE_CLI_GIT=true somewhere in the setup instructions? Thanks everyone for the input!

@DimitarVanguelov
Copy link
Contributor Author

DimitarVanguelov commented Sep 8, 2022

I updated the PR, but please don't merge yet:

  • I put the env var setting in the startup script, just above the julia invocation, but I need to double check how we did this at work (I will check tomorrow). We might have put it in the step 1 script, but his seems like a more natural place to set it, so I welcome input here.
  • I also deleted any trailing white spaces from the README, hope that's ok.
  • I also updated the Julia versions in step 1 to be 1.8.0.

I can back the last two things out if you think they're not appropriate for this PR.

@DimitarVanguelov
Copy link
Contributor Author

Also, maybe using Git.jl is worth exploring in a future PR?

@DimitarVanguelov
Copy link
Contributor Author

Sorry for the delay, been a bit busy for me lately. The way my co-worker had set it up is to put the JULIA_PKG_USE_CLI_GIT env variable in a script under /etc/profile.d, which is either good form or overkill for this sort of thing, I just don't know.

README.md Outdated Show resolved Hide resolved
@pankgeorg
Copy link
Member

Sorry this took quite some time! I added some more general notes and I'm merging this, thanks for contributing!

@pankgeorg pankgeorg changed the title add FAQ section to README Add clarifications about git in README Oct 6, 2022
@pankgeorg pankgeorg merged commit 29e9874 into JuliaPluto:main Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants