I am using a jupyter notebook in the cloud and I want to push my jupyter notebooks into gitlab.
I ran the following commands in the folder:
git init
git remote add origin https://xxx.git
git add .
git commit -m "first commit"
git push -u origin master
After the last command, I got the error:
error: src refspec master does not match any.
So I ran
git show-ref
This showed three refs
refs/heads/main
refs/remotes/origin/HEAD
refs/remotes/origin/main
Trying
git push origin HEAD:master
gave the error about failed certificate verification. What am I doing wrong?
CodePudding user response:
Probably you don't have a correct SSL certificate in the server where you're hosting your GitHub instance.
Personally I would recommend you that you attach a correct certificate, since the ones from Let's Encrypt are totally free, but in any case you can disable SSL verification for a single command:
git -c http.sslVerify=false push origin -u
Or (DON'T DO THAT AND USE A CORRECT CERTIFICATE) disable it at all for all the repositories:
git config --global http.sslVerify false