#1108: Fix git authentication in terminal#1287
Merged
hohwille merged 13 commits intodevonfw:mainfrom May 20, 2025
Merged
Conversation
Collaborator
Pull Request Test Coverage Report for Build 15143174113Details
💛 - Coveralls |
…alfeilex/IDEasy into devonfw#1108-fi-git-credentials
alfeilex
commented
May 14, 2025
cli/src/main/java/com/devonfw/tools/ide/git/GitContextImpl.java
Outdated
Show resolved
Hide resolved
Contributor
|
Tested on Windows and on WSL 2. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #1108
This PR fixes the issue with missing git authentication if no credentials are stored. The previous behavior was that the env variable
GIT_TERMINAL_PROMPT=0was set during each git command. This is removed within this PR since this was the reason for the missing git credentials prompt. Further, if run commands in--batchmode,GIT_TERMINAL_PROMPT=0is set.I tested the fix by creating native images for Windows and Linux. It is also notable that for
git pullcommands the credentials login prompt is not shownFurther I disabled GUI interaction when running git commands in Windows by setting specific environment variables.
See here: https://serverfault.com/questions/544156/git-clone-fail-instead-of-prompting-for-credentials/1054253#answer-1054253