why pushing to the repository didn't work with 'https' but work with 'http'


i was trying to push a git local folder to github repository. while doing so, first i have used ‘https’ to add origin to the url of the git repository and was tring to push origin master. but encountered with following error :

! [rejected] master -> master (fetch first)
error: failed to push some refs to ‘https://github.com/<githubaccount>/<>repo_name.git’
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., ‘git pull …’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push --help’ for details.

… but  when tried with ‘http’ to add origin, it works…

not sure, why ‘https’ didn’t work.

Thanks with Regards,


Hi @sudeshnadeb,

Apologies for the long delay in response, I think the folks at support will be able to help better with this. If you haven’t already, please contact us at https://github.com/contact with the info so we can look into that further.