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

warning: failed to restrict file handles #1591

Closed
1 task done
dkjkj opened this issue Mar 27, 2018 · 9 comments
Closed
1 task done

warning: failed to restrict file handles #1591

dkjkj opened this issue Mar 27, 2018 · 9 comments
Assignees
Milestone

Comments

@dkjkj
Copy link

dkjkj commented Mar 27, 2018

  • 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?
    64 Bit
$ git --version --build-options

2.16.3.windows.1
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
    Windows 7 64 bit Enterprise
$ cmd.exe /c ver

Microsoft Windows [Version 6.1.7601]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
    Defaults except for commit as-is
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: Notepad++
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: 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

CMD

git status
  • What did you expect to occur after running these commands?

On branch develop
Your branch is up to date with 'origin/develop'.

Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)

  • What actually happened instead?

warning: failed to restrict file handles (1450)

warning: failed to restrict file handles (1450)

On branch develop
Your branch is up to date with 'origin/develop'.

Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

Private repos with submodules and also without submodules.

  • Other
    Same is also seen on git commit and git push
@cobrabr
Copy link

cobrabr commented Mar 27, 2018

git pull and git fetch also display the same warning message.

@dscho
Copy link
Member

dscho commented Mar 27, 2018

Does the latest snapshot work for you? (There has been a fix for this exact symptom...) Please find the snapshots here: https://wingit.blob.core.windows.net/files/index.html

@cobrabr
Copy link

cobrabr commented Mar 27, 2018

The latest snapshot seems to be working.

@dkjkj
Copy link
Author

dkjkj commented Mar 27, 2018

@dscho
Copy link
Member

dscho commented Mar 28, 2018

@cobrabr @dkjkj excellent! Thank you so much for testing.

@dscho dscho closed this as completed Mar 28, 2018
@dscho dscho self-assigned this Mar 28, 2018
@dscho dscho added this to the v2.17.0 milestone Mar 28, 2018
dscho added a commit to git-for-windows/build-extra that referenced this issue Apr 3, 2018
When `git.exe` is called with an invalid
subcommand,  [it no longer complains about file
handles](git-for-windows/git#1591).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@orient33
Copy link

orient33 commented May 31, 2019

$ git push
warning: failed to restrict file handles (5)

handle #0: 00000000000002e8 (type 3, handle info (1) 0
handle #1: 00000000000002ec (type 2, handle info (1) 1
handle #2: 0000000000000194 (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: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 8 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 2.43 KiB | 2.43 MiB/s, done.
Total 4 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
...................

$ git version
git version 2.21.0.windows.1

@dscho
Copy link
Member

dscho commented May 31, 2019

@orient33 what is your Windows version?

@orient33
Copy link

orient33 commented Jun 24, 2019

@orient33 what is your Windows version?

window 10
Microsoft Windows [版本 10.0.17134.829]

$ cat /d/pro/Git/etc/install-options.txt
Editor Option: VIM
Custom Editor Path:
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: LFOnly
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Disabled
Enable Symlinks: Disabled
Enable Builtin Interactive Add: Disabled

@dscho
Copy link
Member

dscho commented Jun 24, 2019

@orient33 does this happen with all pushes? Does it also happen if you call this from a PowerShell?

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

No branches or pull requests

4 participants