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

configure-git doesn't work on Windows10 #263

Closed
mwasilew opened this issue Sep 4, 2023 · 5 comments
Closed

configure-git doesn't work on Windows10 #263

mwasilew opened this issue Sep 4, 2023 · 5 comments

Comments

@mwasilew
Copy link
Contributor

mwasilew commented Sep 4, 2023

When configuring git helper on windows there is a mismatch between expected and actual git command. Following the docs step results in the following setup:

execute as administrator

C:\Windows\system32\fioctl-windows-amd64.exe configure-git
Symlinking C:\Users\Milosz\fio\fio-windows-amd64.exe to C:\Program Files\Git\cmd\git-credential-fio.exe

At the same time git's global config is configured as follows:

credential.https://source.foundries.io.helper=fio.exe

When using this setup, git credential manager displays the following dialog:
fioctl_dialog

This issue can be fixed by reconfiguring git. This can be done by:

git config --global --edit

and changing fio.exe to git-credential-fio.exe

For some reason running

git config --global credential.https://source.foundries.io.helper=git-credential-fio.exe

doesn' work.

I believe the root of the problem is here:
https://github.com/foundriesio/fioctl/blob/main/subcommands/git/cmd.go#L77

Possibly change this line to:

helperName = dst
@doanac
Copy link
Member

doanac commented Sep 5, 2023

weird. I've tested this in the past. However, I think there are lots of options to select from while installing Git. I think one of those options might be messing this up.

@mwasilew
Copy link
Contributor Author

mwasilew commented Sep 5, 2023

It's very weird. In this scenario I installed both fioctl and git on a fresh system - it didn't work. When I made some changes to make it work I wasn't able to go back to the "broken" state. Git kept the old settings in some cache which was not available to the user to even see.

@StealthyCoder
Copy link
Member

I made a quick PR #264 . I did the same as you @mwasilew , new clean system with fresh Git not Git for Windows. I chose some non default options like no symlinks and so on. Then installed fioctl and ran the configure credential helper command. It succeeded, then ran git clone https://source.foundries.io/factories/<factory>/containers.git and it failed.

Then I started working the .gitconfig file to make the helper into an absolute path rather than just a name that might or might not resolve. With the full absolute path it worked consistently.

@vkhoroz
Copy link
Member

vkhoroz commented Oct 19, 2023

@StealthyCoder this is fixed, right?

@StealthyCoder
Copy link
Member

@vkhoroz I believe so. #264 fixed this.

@vkhoroz vkhoroz closed this as completed Oct 20, 2023
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

No branches or pull requests

4 participants