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

Git Bash unresponsive after Do you agree to all the source agreements terms? [Y] Yes [N] No: #2013

Closed
codyempress opened this issue Mar 10, 2022 Discussed in #1536 · 5 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@codyempress
Copy link

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?

@ghost ghost added the Needs-Triage Issue need to be triaged label Mar 10, 2022
@denelon
Copy link
Contributor

denelon commented 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 --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].

@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Mar 10, 2022
@denelon denelon added this to the v1.3-Client milestone Mar 14, 2022
@denelon denelon modified the milestones: v1.3-Client, v1.4-Client May 31, 2022
@mburde7
Copy link

mburde7 commented Jun 24, 2022

I believe you have to run the install command in your command prompt, not your git bash

@AndrewB-S
Copy link

AndrewB-S commented Jul 11, 2022

I believe you have to run the install command in your command prompt, not your git bash

This solved my issue.

@Trenly
Copy link
Contributor

Trenly commented Oct 21, 2022

This is actually a Known Issue in Git-for-windows

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`.
        for name in node ipython php php5 python2.7
        do
                case "$(type -p "$name".exe 2>/dev/null)" in
                ''|/usr/bin/*) continue;;
                esac
                alias $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)

@Trenly Trenly mentioned this issue Nov 1, 2022
2 tasks
@denelon denelon modified the milestones: v1.4-Client, v1.5-Client Dec 28, 2022
@Trenly
Copy link
Contributor

Trenly commented 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

@denelon denelon modified the milestones: v1.5-Client, v.Next-Client Apr 18, 2023
@denelon denelon closed this as completed May 3, 2023
@denelon denelon modified the milestones: v.Next-Client, v1.5-Client May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

5 participants