Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 

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://[email protected]:xxxxx/yyyyyy/':Port number ended with 'y'
like image 503
Seunara Avatar asked Jul 29 '17 05:07

Seunara


3 Answers

Gitlab actually requires a user when using deploy tokens. For me, this was caused by mixing in ssh syntax as http://<user>:<pass>@gitlab.com:repo instead of gitlab.com/repo.

like image 59
thisismydesign Avatar answered Oct 04 '22 13:10

thisismydesign


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

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.

like image 26
VonC Avatar answered Oct 04 '22 13:10

VonC


if you change your remote from using ssh to https and accidentally leave a colon in the string - you will a message like this. It's a confusing message, but it makes sense once you understand the source of the problem.

like image 24
Cyrus Avatar answered Oct 04 '22 13:10

Cyrus