-2

I tried to fetch my colleague repository with the below comments

  1. git remote add jon-repo https://gitlab.XXXX/xx.git

  2. git checkout jon-repo/20.5.1_CJ

I am getting error of error : pathspec 'jon-repo/20.5.1_C' did not match any files known to git

I can access his repo via GitLab portal and 20.5.1_CJ is one branch.

I usually fork and do, But here I was told no need to fork and just give the above comments

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • 1
    The title of this question should be something along the lines of "`git checkout` fails when I forget to run `git fetch` first", although that's almost its own answer. The question you *meant* to ask, I think, is "why is my `git fetch` failing" but that is a duplicate of existing questions. – torek May 27 '21 at 06:58

1 Answers1

1

You forgot to fetch from jon-repo.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • git fetch jon-repo -- > GIVE ME ERROR --fatal:unable to access 'httpsxxxx/xx.git/':error setting certificate verify location: CFfile"c:/userxxx/ca-bundle.crt CApath:none – user1398922 May 27 '21 at 06:19
  • 3
    But that's not Git's fault and is a totally different question. See https://stackoverflow.com/questions/3778042/github-error-cloning-my-private-repository. My answer is correct for the question you asked. – matt May 27 '21 at 06:27
  • I am sorry, I am not saying git fault. I am here to fine solution to the problem. I checked with the person he said he already provide authorization. So here to check with the experts – user1398922 May 27 '21 at 06:30
  • Thanks it is authorization issue . – user1398922 May 27 '21 at 08:22