如何解决“端口号以 'y' 结尾"的 url 错误? [英] How to troubleshoot a url error with "Port number ended with 'y'"?
问题描述
在尝试将 gitlab 中的现有存储库克隆到我的本地驱动器时.我用的格式
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
生成的文件夹,例如 mylibgit
是在 XAMPP Web 文件夹(即 htdocs)之外的某个地方找到的,我将它移到那里,但它没有按预期工作.
The resulting folder e.g mylibgit
was found somewhere outside the XAMPP web folder (i.e htdocs), I moved it there but it's not working as supposed.
我将它移到我的桌面并收到错误:
I moved it out to my desktop and got the error :
fatal: unable to access 'https://git@gitlab.com:xxxxx/yyyyyy/':Port number ended with 'y'
推荐答案
对于gitlab,不需要指定用户.
根据您的 GitLab 帐户名称将其替换为 https url.
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/<username>/<yourProjectName.git>
git push -u origin master
注意:
试图从 gitla 克隆一个已经存在的存储库
trying to clone an already existing repository from gitla
这与git clone https://github.com/libgit2/libgit2
"相矛盾,因为这是 GitHub 网址,而不是 GitLab 网址.
This contradict "git clone https://github.com/libgit2/libgit2
", since this is a GitHub url, not a GitLab one.
这篇关于如何解决“端口号以 'y' 结尾"的 url 错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!