I\'m trying to upload my repo on github and go through all the steps upto:
git push -u origin master
at that point it gives me the following er
Unable to access https means: this has nothing to do with SSH (and switching to SSH, while possible, does not explain the original issue)
This has to do with credential caching, meaning Git will be default provide the credentials (GitHub account and password) of the old account while you are trying to push to the new account.
See if you have a credential helper that would have cached your (old account) credentials (username/password) used to authentication you.
git config credential.helper
On Mac, as commented by Arpit J, just goto/open your keychain access->search for github.com related file->and edit credentials there.
See "Updating credentials from the OSX Keychain"
On Windows for example, that would be the Windows Credential Managers.
Open the Windows Credential Store, and see if the first user is registered there: delete that entry, and you will be able to authenticate with the second user.
(Here is an example for BitBucket)
In command-line (see git credential):
git credential reject protocol=https host=github.com
and then to set the new username & password:
git credential fill protocol=https host=github.com