0

I am new to creating projects in GitHub (new to automation) I have followed some steps and have got to the stage where I input

  • $ git push -u origin master

When I add this I get the following error returned

 $ git push -u origin master
    fatal: HttpRequestException encountered.

An error occurred while sending the request.

  Unhandled Exception: System.ObjectDisposedException: Cannot access a closed     file.
   at System.IO.__Error.FileNotOpen()
   at System.IO.FileStream.Flush(Boolean flushToDisk)
   at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
   at Microsoft.Alm.Git.Trace.Microsoft.Alm.Git.ITrace.Flush()
   at Microsoft.Alm.Cli.Program.Die(String message)
   at Microsoft.Alm.Cli.Program.Die(Exception exception)
   at Microsoft.Alm.Cli.Program.Main(String[] args)
    Username for 'https://github.com': awa1ker23
    remote: Invalid username or password.
    fatal: Authentication failed          for 'https://github.com/awa1ker23/DefaultWebFrameWork.git/'

I have added my username and password but it says that's the password authentication failed. However it is definitely the correct username and password.

I was wondering if I got this message because I changed the name of the project in Eclipse?

awalker23
  • 45
  • 1
  • 6

1 Answers1

0

Updating to the latest version of git should solve the problem. Download git client

joemokenela
  • 299
  • 1
  • 9
  • That didn't work, I am still getting the same error. – awalker23 Nov 21 '18 at 17:01
  • Try using the token instead . You can see the guide in the following url on how to generate a token. [link](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) – joemokenela Nov 22 '18 at 07:27
  • I also saw the similar question on the following [link](https://stackoverflow.com/questions/29297154/github-invalid-username-or-password) – joemokenela Nov 22 '18 at 10:57