Partial fix for Git protocol violation

This forum is for all Flare issues related to using Source Control.
Post Reply
nat
Jr. Propeller Head
Posts: 5
Joined: Mon Dec 15, 2014 4:41 pm
Location: Wellington, New Zealand

Partial fix for Git protocol violation

Post by nat »

Hi, my team uses Git for source control and the IT folks at my company recently shifted us from BitBucket into Azure DevOps (using Git, not TFS). I'm running Flare 2021 and Windows 10.

I've been having problems for the last week, ever since I used Flare to zip up my project into a ".flprjzip" zip file. When I clicked Project > Zip Project, Flare advised me that my project was currently bound to source control, and asked if I would like to remove the binding information from the zipped copy of the project before saving it. I clicked ‘Yes’. Ever since then, I was unable to connect to any Git server (either Azure DevOps or the old BitBucket server) for any of my Flare projects (not just the project I zipped up). My colleague is able to still use Flare and Git without any issues, so the problem has to do with my laptop. Something broke my Git settings, and the only event I can think of is when I zipped up my Flare project. I suspect that Flare 2021 might have tweaked a Git setting, but I haven't figured out what yet.

Here's the error message I was getting from within Flare whenever I tried to push or pull:
Pulling local changes from remote...
fatal: An error occurred while sending the request.
fatal: The server committed a protocol violation. Section=ResponseStatusLine
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Password for 'http://[my-username]@[my-company's-server]:8080': No such file or directory

The source control operation finished with warnings and/or errors. Press Close when you are done reviewing the messages.
I figured out what's happening is, Flare is telling Git to log into the server. Git is using the correct proxy information “proxy = http://[my-username]@[my-company's-server]:8080” but without a password. Wherever Git is looking for my stored credentials, it’s not finding any for some reason, so the request goes out with incorrect or absent credentials. This generates a request back from the server telling my computer to pop up a window or something to prompt me for my password. However Flare is running an automatic script rather than running in a command window, so it’s getting stuck on an invisible password prompt (hence the ‘bash: /dev/tty’ error, and ‘failed to execute prompt script’). This ends in a fatal error because Git couldn’t figure out my password to send it to the server as a fully-formed set of credentials.

Things I tried with no success:
  • Delete all my local files and do a fresh pull from source control (no luck, because Flare can't contact the server using Git)
  • Delete all git-related credentials from Windows Credentials Manager, trying to wipe old/bad credentials from the system and force Git to store new credentials (no luck)
  • Deactivate and reactivate Flare to wipe the proxy information and reinstate new proxy information (didn't fix the error)
  • Run the latest Git installer to update Git (made no difference)
  • Try Flare 2020r3 vs Flare 2021 (both give the same error)
  • Compare Git configuration settings on my computer vs my colleague (we don't seem to have any differences).
  • Run Git Bash from the command line - this sort of worked... Git threw some error messages at me and an OpenSSH window prompted me for my password, but eventually it did the push/pull operation. However the password wouldn't 'stick' and I would continue to get the same password prompt every time. This only worked in Git Bash, not using Flare.
Here's the partial fix I found online... I altered my git configuration to use the Windows credential store. From Git Bash, type:

Code: Select all

git config --global credential.helper manager
Now instead of popping up with an OpenSSH window to ask for my credentials, Git checks in the Windows credential store.
So now when I tell Flare to connect to the Git repository in DevOps, here's the message I get:
Pulling local changes from remote...
fatal: An error occurred while sending the request.
fatal: The server committed a protocol violation. Section=ResponseStatusLine
[pause while Git checks the Windows credential store and finds my credentials]
fatal: An error occurred while sending the request.
fatal: The server committed a protocol violation. Section=ResponseStatusLine
From https://dev.azure.com/[my-repository-name]
*branch master -> FETCH_HEAD
Already up to date.
i.e. Git looks [somewhere] for credentials, can’t find any, contacts the server, gets a password request and finds it in the Windows credentials store, sends credentials to the server, still gets some sort of second error, but in the end completes the operation anyway.

In other words, I’ve gotten the system working. But there’s still some sort of kludgy issue going on. I’d like to figure out where that first error is coming from, i.e. what is Git’s first go-to location for trying to find my credentials, and why doesn’t that work on the first attempt?

Thanks,
Nat
Post Reply