Authentication with Github failed


I'm trying to link bash on pythonanywhere with my Github account, according to the Djangogirls tutorial.

I get the following error message when running --python=3.8<Username>/<RepoName>.git:

< Running API sanity checks > \ ~<:>>>>>>>>> Cloning into '/home/Suqui/'... Username for '': Username Password for '': remote: Invalid username or password. fatal: Authentication failed for '' Traceback (most recent call last): File "/home/Suqui/.local/bin/", line 47, in <module> main(arguments['<git-repo-url>'], arguments['--domain'], arguments['--python'], nuke=arguments.get('--nuke')) File "/home/Suqui/.local/bin/", line 30, in main project.download_repo(repo_url, nuke=nuke), File "/home/Suqui/.local/lib/python3.8/site-packages/pythonanywhere/", line 18, in download_repo subprocess.check_call(['git', 'clone', repo, str(self.project_path)]) File "/usr/lib/python3.8/", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['git', 'clone', '', '/home/Suqui/']' returned non-zero exit status 128.

Username and password are definitively correct, I've tried various times and double - and triple checked.

Thanks in advance! :)

What happens when you try to git clone that repo in a Bash console?

Similar traceback:

Cloning into 'SuquiWrites'... Username for '': Username Password for '': remote: Invalid username or password. fatal: Authentication failed for ''

It looks like you didn't change placeholders for the username and repo name -- in the original command you should put in place of <Username> your github account name and in the place of <RepoName> -- name of the repo you want to clone. But I'd suggest you just go to your github account and copy the link which will be shown to you after clicking on the green "Code" button in the right upper corner above the files list.

No, no, I did do that. I just didn't want to post the information here, so I edited it out. But the call was done correctly. :)

Oh, it wasn't explicit in your post so I wanted to eliminate this possibility (it happens, really). Does it work with the same credentials when you do this on your local machine?

Yes, on the local it works fine. Mind, I had the same problem on my old machine locally to start with.

OK -- just to be sure: are you using exactly the same command to clone the repo on your local machines and on PythonAnywhere? (Now I want to exclude that there are no differences between machines like using ssh over https, or having credentials predefined in a config file etc.).

yes, exactly the same commands. I've also tried with both ssh and https and neither works.

This article seems to sugegst that you'd get that error if you had 2FA configured for your account and have not set up a personal access token.

Yes, this worked! Thanks so much. :)

Excellent, glad we could help!