I tried to push my code to github by using the following commands:
git remote add https://github.com/user/sample_app.git
git push origin master
And got the following error:
error: failed to push some refs to 'https://github.com/user/sample_app.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again. See the 'non-fast forward'
section of 'git push --help' for details.
To see whether the error is at the remote I entered:
git pull
and got the following error:
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/sub1010/sample_app.git/info/refs
fatal: HTTP request failed
Why can’t I push my code to github?
try adding ssh repo and not http repo as such