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
{{ message }}
Repository navigation
Git Bash unresponsive after Do you agree to all the source agreements terms? [Y] Yes [N] No: #2013
Hello,
I am starting out in software development - please don't crucify me if I don't know the basics!
I have been trying to cache my GitHub credentials in Git. I am trying to install Git CLI with Bash
winget install --id GitHub.cli
I'm getting the following prompt:
Do you agree to all the source agreements terms?
[Y] Yes [N] No:
The problem is that I can't find a way to answer this! I have tried Yes, Y, y and even no but each time the cursor just jumps to a new line when I press enter. How do I accept this and get over this part?
Which Terminal are you using? Is it CMD or Windows Terminal?
For a "work around", you can append "--acceptSourceAgreements" to accept the agreement from the "msstore" source. It's checked the first time you connect to get the list of packages from a source with agreements. You can also append "--acceptPackageAgreements" to accept any package level agreements. Those also come from the "msstore" source. In this case, the GitHub.cli package is not coming from the "msstore" source so:
winget install GitHub.cli --acceptSourceAgreements should work.
The prompt is looking for "Y" so when that is prompted, you should be able to type "Y" and then press [Enter].
Some console programs, most notably non-MSYS2 Python, PHP, Node and OpenSSL, interact correctly with MinTTY only when called through winpty (e.g. the Python console needs to be started as winpty python instead of just python).
Calling winget --wait will cause the same unresponsiveness, but calling winpty winget --wait works as expected. In fact, the default aliases file for Git Bash contains a section on apps that require a win32 console -
case"$TERM"in
xterm*)
# The following programs are known to require a Win32 Console# for interactive usage, therefore let's launch them through winpty# when run inside `mintty`.fornamein node ipython php php5 python2.7
docase"$(type -p "$name".exe 2>/dev/null)"in''|/usr/bin/*) continue;;
esacalias$name="winpty $name.exe"done
;;
esac
/d/Program Files/Git/etc/profile.d/aliases.sh [unix] (22:10 20/10/2022)
By opening the file in a text editor and adding winget after the list of names, closing and then reopening git bash, it should work as expected (Leaving this here as a note for time travellers)
Activity
denelon commentedon Mar 10, 2022
Which Terminal are you using? Is it CMD or Windows Terminal?
For a "work around", you can append "--acceptSourceAgreements" to accept the agreement from the "msstore" source. It's checked the first time you connect to get the list of packages from a source with agreements. You can also append "--acceptPackageAgreements" to accept any package level agreements. Those also come from the "msstore" source. In this case, the GitHub.cli package is not coming from the "msstore" source so:
winget install GitHub.cli --acceptSourceAgreementsshould work.The prompt is looking for "Y" so when that is prompted, you should be able to type "Y" and then press [Enter].
mburde7 commentedon Jun 24, 2022
I believe you have to run the install command in your command prompt, not your git bash
AndrewB-S commentedon Jul 11, 2022
This solved my issue.
Trenly commentedon Oct 21, 2022
This is actually a Known Issue in Git-for-windows
Calling
winget --waitwill cause the same unresponsiveness, but callingwinpty winget --waitworks as expected. In fact, the default aliases file for Git Bash contains a section on apps that require a win32 console -By opening the file in a text editor and adding
wingetafter the list of names, closing and then reopening git bash, it should work as expected (Leaving this here as a note for time travellers)Trenly commentedon Mar 15, 2023
This issue should be resolved with Git For Windows version 2.40.0.
See git-for-windows/build-extra#483 and microsoft/winget-pkgs#99577