I've been including some private repos in some work I've been doing recently and Yarn has been spitting its dummy out at packages that begin with 'git+ssh'.
The fix locally was to create an ~/.ssh/config file using
vim ~/.ssh/config. If the file is not there it will create one. Then add host information and the user:
Host bitbucket.org User git Host github.com User git
All works fine.