Short Version
git config --global core.sshcommand "C:/Windows/System32/OpenSSH/ssh.exe"
More Detail
I was able to reproduce this. It seems that, by default under Nushell:
In my case, ssh-add (and ssh) in Nushell is coming from the Windows OpenSSH implementation. I'm assuming you have the Windows OpenSSH client installed?
> which ssh ssh-agent ssh-add
╭───────────┬───────────────────────────────────────────┬──────────╮
│ command │ path │ type │
├───────────┼───────────────────────────────────────────┼──────────┤
│ ssh │ C:\Windows\System32\OpenSSH\ssh.exe │ external │
│ ssh-agent │ C:\Windows\System32\OpenSSH\ssh-agent.exe │ external │
│ ssh-add │ C:\Windows\System32\OpenSSH\ssh-add.exe │ external │
╰───────────┴───────────────────────────────────────────┴──────────╯
On the other hand, as far as I can tell, git for Windows seems to default to using the Git-bash provided /usr/bin/ssh. This requires that the environment variables are set properly by /usr/bin/ssh-agent -s (normally eval'd into Bash or other shell). Under Git-Bash:
$ which ssh ssh-agent ssh-add
/usr/bin/ssh
/usr/bin/ssh-agent
/usr/bin/ssh-add
Since the Git-bash /usr/bin/ssh-agent isn't available under Nushell for Windows, we need to config Git to just use the Windows OpenSSH agent directly. This can be done (reference) via:
git config --global core.sshcommand "C:/Windows/System32/OpenSSH/ssh.exe"
After I did that, git under Nushell used my ID to access private GitHub repos.