Disable save of global git config
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 42/100
Rechercherichtung
The issue points to FileBasedConfig.save and FS$FileStoreAttributes.saveToConfig; begin by tracing how file-store attributes are persisted to the user config and how configuration saving is controlled. Add a way to prevent writes while retaining reads and in-memory changes, and verify that the immutable-config scenario no longer logs a failed-save error.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Description
JGit attempts to automatically save the user's .gitconfig file but this is not always desirable. In our CI/CD environment we set .gitconfig as immutable (+i in linux) to prevent builds from changing settings that may effect other builds. JGit will log the following error when it attempts to save.
I would like to be able to disable saving so that we only read from the user config and potentially make in-memory only config changes but never modify the underlying user config file.
Cannot save config file 'FileBasedConfig[/home/jenkins/.gitconfig]'
java.io.IOException: Cannot commit write to /home/jenkins/.gitconfig
at org.eclipse.jgit.storage.file.FileBasedConfig.save(FileBasedConfig.java:258)
at org.eclipse.jgit.util.FS$FileStoreAttributes.saveToConfig(FS.java:584)
at org.eclipse.jgit.util.FS$FileStoreAttributes.lambda$0(FS.java:364)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Motivation
Preventing saving of the user .gitconfig when using jgit.
Alternatives considered
None. The stack is printed to the logs but ignored.
Additional context
No response
- Vorherrschende Sprache
- Java
- Sterne
- 427
- Forks
- 116
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus eclipse-jgit/jgit
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
eclipse-jgit/jgit#329 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
eclipse-jgit/jgit#327 ·
-
Repository.create(boolean bare) should provide a no-arg overload that uses isBare()Evtl. wieder frei @hardikyadav12 hat das vor 77 Tagen übernommen, und es ist kein Pull Request offen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
eclipse-jgit/jgit#297 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
eclipse-jgit/jgit#293 · 2 Kommentare ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
eclipse-jgit/jgit#288 ·
Alle Issues in eclipse-jgit/jgit
Ähnliche Issues
-
? - Needs Triage bot_watch bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
NVIDIA/cudf-spark-jni#5594 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
-
Upgrade solr to 9.11.0Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
DataONEorg/dataone-indexer#390 ·