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 Credential Manager Core missing in ARM64 libexec folder #3015

Closed
dennisameling opened this issue Feb 2, 2021 · 8 comments · Fixed by #3076
Closed

Git Credential Manager Core missing in ARM64 libexec folder #3015

dennisameling opened this issue Feb 2, 2021 · 8 comments · Fixed by #3076

Comments

@dennisameling
Copy link

The final thing I'm missing in the PortableGit package for ARM64 is the Git Credential Manager Core. Because of this, when doing operations like git push from within a cmd/powershell terminal, results in:

PS C:\repos\test> git push
Username for 'https://github.com':

Notice the difference in the amount of items in the arm64/libexec vs mingw32/libexec:

image

I found a reference to git-credential-manager-core in please.sh, but not entirely sure where in the whole build process it is invoked. Could someone point me in the right direction as to where this is added to libexec? We should be able to use the gcmcore-win-x86 (x86) version on ARM because it can leverage 32-bit emulation.

Thanks in advance!

@rimrul
Copy link
Member

rimrul commented Feb 2, 2021

It gets added to libexec here

@dscho
Copy link
Member

dscho commented Feb 2, 2021

I found a reference to git-credential-manager-core in please.sh, but not entirely sure where in the whole build process it is invoked.

Right, the entire process is a bit complex.

As @rimrul pointed out, Git Credential Manager Core is built as a separate Pacman package. (In reality, it is actually not built, but the pre-built binaries are copied from https://github.com/microsoft/Git-Credential-Manager-Core/releases).

Since there is no ARM64 support in MSYS2 yet, it would be relatively tough to provide mingw-w64-git-credential-manager-core packages for that architecture.

One thing we could easily do as a work-around for ARM64, though, would be to drop a shell script into /mingw32/bin/git-credential-manager-core which would read like this:

#!/bin/sh

exec /mingw32/libexec/git-core/git-credential-manager-core.exe "$@"

@dennisameling
Copy link
Author

dennisameling commented Feb 6, 2021

@dscho I can confirm that approach works 👍🏼 had to run git-credential-manager-core configure in Bash and then it set my ~/.gitconfig to helper = C:/Program\\ Files\\ \\(x86)\\)/Git/mingw32/libexec/git-core/git-credential-manager-core.exe.

Would it make sense to provide a PR against build-extra which adds this Shell script in the PKGBUILD/package() script?

@dscho
Copy link
Member

dscho commented Feb 6, 2021

I'd rather generate it, to be honest. It's only a workaround until we get a proper solution.

@dennisameling
Copy link
Author

What do you mean by generate it, where would we do that? In the PKGBUILD or in please.sh? 😊

@dscho
Copy link
Member

dscho commented Feb 7, 2021

Hmm. I thought we could generate it in installer/release.sh, but you're right: we also need it in the other */release.sh. Hmpf.

But I really don't want it in non-ARM64 artifacts... or for that matter, in the SDKs.

@dennisameling
Copy link
Author

dennisameling commented Feb 7, 2021

What about we add it to please.sh in the --include-arm64-artifacts section? That way, it'll only be included when an ARM64 build is requested, plus it applies to all */release.sh scripts 🚀

https://github.com/git-for-windows/build-extra/blob/d2911a0701e72f96630904830bb4497aa5702d66/please.sh#L4824-L4826

EDIT: wait... but what exactly would we be doing in that step? Dynamically creating /mingw32/bin/git-credential-manager-core so that it is included by the */release.sh scripts? Or wouldn't it work that way?

@dscho
Copy link
Member

dscho commented Feb 8, 2021

What about we add it to please.sh in the --include-arm64-artifacts section? That way, it'll only be included when an ARM64 build is requested, plus it applies to all */release.sh scripts 🚀

I think that could work, if we put the script into the provided directory's /bin/ subdirectory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants