fatal: couldn't find remote ref main
I tried to git pull from server:
[advancew@sjc02 zws_framework_2]$ ls
[advancew@sjc02 zws_framework_2]$ git pull origin main
fatal: couldn't find remote ref main
[advancew@sjc02 zws_framework_2]$ git branch -vv
[advancew@sjc02 zws_framework_2]$
ref: https://stackoverflow.com/questions/11552437/git-pull-remote-branch-cannot-find-remote-ref
Can't understand this error message: fatal: couldn't find remote ref main
So probably the branch is not called main but something else, master maybe?
git pull origin master
I am using gitlab and the branch is called main
@davy_yg So check your remote git remote -v
[advancew@sjc02 zws_framework_2]$ git remote -v
origin .git/ (fetch)
origin .git/ (push)
[advancew@sjc02 zws_framework_2]$ git pull origin main
fatal: couldn't find remote ref main
@davy_yg So you don't have a remote? git remote set-url origin git@yourgitrepourl:yourrepo
Perhaps check on a computer where it works.
@davy_yg did you
check on a computer where it works.
I tried using other laptop and it shows the same error message.
[advancew@sjc02 zws_framework_2]$ git pull origin main
fatal: protocol 'git@https' is not supported
@davy_yg So get the correct one from gitlab. I am sure there it tells you the clone command somewhere, and there you can see the repo url
Please or to participate in this conversation.