Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hub asking for username and password when used with ssh protocol #3011

Closed
metapraveen opened this issue Sep 28, 2022 · 4 comments
Closed

hub asking for username and password when used with ssh protocol #3011

metapraveen opened this issue Sep 28, 2022 · 4 comments
Labels

Comments

@metapraveen
Copy link

Command attempted:
hub clone dot-files

What happened:
promts for username

More info:
git config --global hub.protocol
ssh

hub --version
git version 2.37.0 (Apple Git-136)
hub version refs/heads/master

OS
macOS 12.6 (21G115)

Giving full URL works fine for e.g. hub clone git@github.com:metapraveen/dot-files.git clones the repo via ssh auth

@chaimleib
Copy link

hub is failing for me like this, too, anytime I try something that requires authentication. git clone and git push work, but not the hub versions of these commands.

(master) % hub create
github.com username: chaimleib
github.com password for chaimleib (never stored):
Error creating repository: Not Found (HTTP 404)
Not Found
% hub --version
git version 2.38.2
hub version 2.14.2

I've tried both of these:

% git config --global hub.protocol https
% git config --global hub.protocol ssh

I have URL replacement on to force ssh instead of https on github, but both above configs also fail, even if I turn replacement off:

[url "git@github.com:"]
	insteadOf = https://github.com/

macOS 10.15.7

@fatso83
Copy link

fatso83 commented Jan 24, 2023

Yeah, hub has not been usable for anything for the last six months. Only auth errors and no prompting to authenticate using browser or similar.

@daiyam
Copy link

daiyam commented Mar 2, 2023

OK It's not just me. Same issue.

Edit: You need to use PAT as password (#2655 (comment))

@fatso83
Copy link

fatso83 commented Mar 6, 2023

That is a workaround, not a fix for the broken 2FA handling. A better workaround is to just ditch Hub for the official GitHub CLI, as Hub is essentially deprecated: https://mislav.net/2020/01/github-cli. All of Mislav's efforts go into that these days and I have been able to transition from all current Hub commands to gh very easily (i.e. gh pr checkout <issue>, gh browse, ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants