Hub release returns 401 and ~/.config/hub does not exist

Hi all! I’ve started using “hub release create” in my Makefile since some time, but it’s not working at all anymore. I am using

hub release create" file1 ... fileN TAG`

and I keep receiving

Error creating release: Unauthorized (HTTP 401)
Bad credentials

even if I enter my credentials correctly. I’ve googled for over an hour now. All the solutions point to ~/.config/hub which in my case doesn’t even exist.

Thanks for any hint.

Vincenzo

:wave: Welcome!

Are you using a username and password as credentials? Password authentication is fully deprecated now, so that could be causing your issue.

Thanks! So how do I change my authentication mode? Hub just asks for a username and a password; I am keen on doing what is needed but have no clue :slight_smile:

Also: is the “hub” command still the best way to upload a release from the command line? That’s all I need (since I compile on a server and I need to release from there). Or are there better / simpler / more supported methods?

Hi again. After my own reply, I investigated more and found that “hub” is a little bit superceded by “gh”. But “gh” is also provided by the “gitsome” ubuntu package, which is likely not up-to-date, and it missed the “release” command. After learning about “gh release” (which I have now from the official git PPA for ubuntu) I could finally upload my release.

1 Like