The agent should not work only, but your tools should know where the agent is. It is stored in the $SSH_AUTH_SOCK variable, and if it works for you from one terminal, it should not be from the second.
If you want it to work in your NetBeans, you need to enter this variable in the NetBeans environment variables (but you donβt know how to do this so that it is transferred from the Windows environment to the Cygwin terminal in NetBeans).
Or enter it later into the working terminal (possibly using .bashrc or other startup scripts). A simple test case should be echo $SSH_AUTH_SOCK in the MinGW terminal, and then write export SSH_AUTH_SOCK=/the/path/you/got/from/previous/command in the Cygwin terminal.
You can later automate it by storing the variable in some file that you can read in Cygwin.
# MinGW scriplet echo "export SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> ~/agent_env
Then you can use your mingw agent from the cygwin shell.
source share