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

Support for ~/_netrc fallback unavailable in 2.47.1? #5306

Closed
1 task done
kevinsun49 opened this issue Dec 11, 2024 · 3 comments · Fixed by git-for-windows/MINGW-packages#134
Closed
1 task done

Comments

@kevinsun49
Copy link

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.47.1.windows.1
cpu: x86_64
built from commit: 2cd22437f64229935dc564db969cbcbfed5e9045
sizeof-long: 4
sizeof-size_t: 8
shell-path: D:/git-sdk-64-build-installers/usr/bin/sh
feature: fsmonitor--daemon
libcurl: 8.11.0
OpenSSL: OpenSSL 3.2.3 3 Sep 2024
zlib: 1.3.1
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.22631.4460]
(c) Microsoft Corporation. All rights reserved.
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
$ cat "C:\Program Files\Git\etc\install-options.txt"

Editor Option: VIM
Custom Editor Path:
Default Branch Option:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable FSMonitor: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

    • No

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

    • Git Bash
  • What commands did you run to trigger this issue? If you can provide a
    Minimal, Complete, and Verifiable example
    this will help us understand the issue.

    • (Running with only ~/_netrc file present, no ~/.netrc)
git fetch origin
  • What did you expect to occur after running these commands?

    • Fetch to complete with no user input needed
  • What actually happened instead?

    • Asked for GitHub user/pass
    • This issue occurs when ~/_netrc is present and not ~/.netrc. Downgrading to 2.47.0 and adding ~/.netrc are both confirmed to fix it (I have been using Git just fine with only ~/_netrc present before recently updating to 2.47.1). I'm wondering that since 2.47.1 comes bundled with cURL 8.11.0, if it's possible any recent changes in libcurl may be responsible for this regression? There is a netrc related change in 8.11.0, but I'm not sure if it's the culprit here.
@rimrul
Copy link
Member

rimrul commented Dec 11, 2024

There is a netrc related change in 8.11.0, but I'm not sure if it's the culprit here.

I think it is. The fallback only happens if parsenetrc() for ~/.netrc fails with NETRC_FILE_MISSING, but it probably fails with NETRC_FAILED now.

@kevinsun49
Copy link
Author

Thank you! Regression is fixed in cURL but didn't make it into 8.11.1. Will likely be shipped in next minor release.

@dscho
Copy link
Member

dscho commented Dec 14, 2024

Thank you! Regression is fixed in cURL but didn't make it into 8.11.1. Will likely be shipped in next minor release.

And it was fixed by you! curl/curl#15735

Congratulations @kevinsun49, I love seeing this!

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