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 error #4748

Open
venus-Liu opened this issue Dec 25, 2023 · 2 comments
Open

git error #4748

venus-Liu opened this issue Dec 25, 2023 · 2 comments

Comments

@venus-Liu
Copy link

git version:2.43.0
windows:win11
error log:
warning: failed to restrict file handles (5)

handle #0: 000000000000018c (type 3, handle info (1) 0
handle #1: 0000000000000190 (type 3, handle info (1) 1
handle #2: 000000000000015c (type 2, handle info (1) 1

This is a bug; please report it at
https://github.com/git-for-windows/git/issues/new

To suppress this warning, please set the environment variable

    SUPPRESS_HANDLE_INHERITANCE_WARNING=1

git credential-manager get: line 1: /mingw64/libexec/git-core/git: Permission denied
0 [bash] bash 1027 dofork: child -1 - CreateProcessW failed for 'D:\Git\usr\bin\bash.exe', errno 13
bash: fork: Permission denied
error: failed to execute prompt script (exit code 254)
fatal: could not read Username for 'https://XXXXXXXX': No such file or directory

@dscho
Copy link
Member

dscho commented Jan 10, 2024

Can you provide some background? Like, what your setup looks like, what command you ran, etc.

@zeeshan-k
Copy link

zeeshan-k commented May 7, 2024

Can you provide some background? Like, what your setup looks like, what command you ran, etc.

Sorry for jumping on someone else's thread, BUT I faced the same issue so thought of adding some context here since the OP hasn't since a long time.

The warning was a one off thing, it never happened before on the same version of Git, and it never happened after. Although I tried reproducing the same warning again.

Environment:
Repo is hosted on Github Enterprise, I am using git for windows on my local development environment (Windows 11). Versions are mentioned in the end, and it is restricted by organization's policy hence I can't upgrade on my own.

What I did:
I did a git push --force and it worked. Then I added a few file changes (just some whitespaces cleanup, no other big change), amended the last commit and did the git push --force again which resulted into this warning. When I look in the github web UI, the git push appears to have been pushed. Although the git for windows CLI gave me warnings. Below is the CLI dump (sensitive/user specific information may have been removed):


$ git push zeeshan master --force
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 8 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 7.87 KiB | 1.12 MiB/s, done.
Total 6 (delta 5), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (5/5), completed with 5 local objects.
To https://github.xxxxxx.corp/xxxxxx/xxxx.git

  • 305ed4f...16b9306 master -> master (forced update)

@ MINGW64 ~/git/xxxx (master)
$ git add .

@ MINGW64 ~/git/xxxx (master)
$ git commit --amend
[master 3714ef3]
Date: Tue May 7 11:11:28 2024 +0530
4 files changed, 1183 insertions(+), 1128 deletions(-)

@ MINGW64 ~/git/xxxx (master)
$ git push zeeshan master --force
warning: failed to restrict file handles (5)

handle #0: 0000000000000164 (type 3, handle info (1) 0
handle #1: 0000000000000168 (type 3, handle info (1) 1
handle #2: 0000000000000420 (type 3, handle info (1) 1

This is a bug; please report it at
https://github.com/git-for-windows/git/issues/new

To suppress this warning, please set the environment variable

    SUPPRESS_HANDLE_INHERITANCE_WARNING=1

Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 8 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 7.87 KiB | 474.00 KiB/s, done.
Total 6 (delta 5), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (5/5), completed with 5 local objects.
To https://github.xxxxxx.corp/xxxxxx/xxxx.git

  • 16b9306...3714ef3 master -> master (forced update)

$ git -v
git version 2.44.0.windows.1

Github:
GitHub Enterprise Server 3.11.7

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

3 participants