How to troubleshoot a url error with “Port number ended with 'y'”?

前端 未结 5 2130
失恋的感觉
失恋的感觉 2021-02-08 15:54

While trying to clone an already existing repository from gitlab into my local drive. I used the format

$ git clone https://github.com/libgit2/libgit2  mylibgit          


        
5条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-08 16:38

    For gitlab, you don't need to specify the user.
    Replace it by an https url based on your GitLab account name.

    cd /path/to/your/repo
    git remote set-url origin https://gitlab.com//
    git push -u origin master
    

    Note:

    trying to clone an already existing repository from gitla

    This contradict "git clone https://github.com/libgit2/libgit2", since this is a GitHub url, not a GitLab one.

提交回复
热议问题