I've shoved this in a new git function which is fully specced to handle the above in unit tests: 
https://github.com/tommeier/git-release/pull/7/files#diff-ca3e6e2880a2f7b8ac8227f1b5445107R7

The regex to handle this was : `"^(https?:\/\/|git:\/\/|git\@)?github\.com[:/]([^.]*)(.git)?$"`. Definitely catches http, https, ssh and some other odd permutations.