-1

I get the error of "invalid username or password".

Also, I get the message that my authentication failed.

trying to push:

error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/theseareprojects/testproject.git'

verifying remote:

origin  https://github.com/theseareprojects/testproject.git (fetch)
origin  https://github.com/theseareprojects/testproject.git (push)

verifying own info:

user.email=theseareprojects@protonmail.com
user.name=theseareprojects
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://github.com/theseareprojects/testproject.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*

My info is correct...

Lol this kinda stucks, so thanks for the help. I didn't even enable 2 factor authentication. This has been puzzling me for quite a while now.

Darren N.
  • 3
  • 1
  • The error message you pasted doesn't say anything about authentication at all. It's complaining that you're trying to push a branch named `master` but you don't have one. – hobbs Jun 06 '20 at 02:19
  • Are you on command line? At what stage do you get authentication error? – zedfoxus Jun 06 '20 at 02:36
  • https://stackoverflow.com/search?q=%5Bgit%5D+error%3A+src+refspec+master+does+not+match+any – phd Jun 06 '20 at 11:13

1 Answers1

0

I think you've missed a commit. Try following step by step,

git add .
git commit -m "initial project commit"
git push origin master

However, you can also try the following as local reference independent solution if it's already committed. This signifies such you want to push the local HEAD ref to the remote master ref.

git push origin HEAD:master
Arnab Nandy
  • 6,472
  • 5
  • 44
  • 50