Git bash Error: Could not fork child process: There are no available terminals (-1)

后端 未结 28 2101
抹茶落季
抹茶落季 2020-12-12 12:17

I have had up to 8 git bash terminals running at the same time before.

Currently I have only 2 up.

I have not seen this error before and I am not understand

相关标签:
28条回答
  • 2020-12-12 12:42

    Seems to be an issue with the processes launched from the git bash indeed, like @mamacdon suggested in his comment on the top answer by @Scott Newson.

    For me, the issue appeared if I launched a vscode from the bash with code, and if this instance of vscode launched an integrated git terminal while the original bash was still running.

    Doesn't matter whether that terminal was launched at the start or later, as long as it was while the original bash was still running.

    Didn't happen when the bash was closed before the integrated terminal was opened. Didn't differentiate between exit and closing bash via windows. Didn't happen with another older bash window still running.

    The way to deal with it was for me to close the terminals in vscode with exit or 'Kill Terminal' (be careful not to mix that up with 'close pane'), or of course, closing vscode itself.

    If you get this error try to remember what you launched from the bash and kill it. If the other answers worked for you, it's probably just that these are the things launched by your bash or launched by processes you launched from the bash and they somehow were getting a child of your original bash.

    0 讨论(0)
  • 2020-12-12 12:42

    Please find the ssh-agent process in the Task Manager window. After you stop or kill the ssh-agent process the error will disappear.

    0 讨论(0)
  • 2020-12-12 12:43

    I tried to kill all my git terminals in task manager solves the problem. This works for me too. good luck.

    0 讨论(0)
  • 2020-12-12 12:46

    In my Case I need to kill Git bash in Windows. So opened Command Prompt and ran below command

    $ tasklist
    

    It will list down all running tasks, then need to kill bash.exe task using below command

    $ taskkill /F /IM bash.exe 
    
    0 讨论(0)
  • 2020-12-12 12:48

    In my case I had visual studio code running and closing it resolved the issue.

    0 讨论(0)
  • 2020-12-12 12:49

    This happens when you exit git bash without terminating existing process. Just try and kill those processes that you started from git bash. I was running node process inside git bash, so I killed all node processes Steps to kill

    1. Open Task Manager
    2. Goto Details Tab
    3. Look for node.exe(you look for you processes)
    4. Kill it each and every node process
    5. Open Git Bash again
    0 讨论(0)
提交回复
热议问题