Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid port number when user name starts with numbers #24

Closed
0x7FFFFFFFFFFFFFFF opened this issue Aug 2, 2020 · 9 comments
Closed
Labels

Comments

@0x7FFFFFFFFFFFFFFF
Copy link

I got the following error when executing on Windows 10. Any ideas?

C:\Users\admin\AppData\Local\nvim>git-brws
Error: Broken URL 'ssh://git@github.com:0x7FFFFFFFFFFFFFFF/neovim_config.git': invalid port number

C:\Users\admin\AppData\Local\nvim>cat .git/config
[core]
        repositoryformatversion = 0
        filemode = false
        bare = false
        logallrefupdates = true
        symlinks = false
        ignorecase = true
[remote "origin"]
        url = git@github.com:0x7FFFFFFFFFFFFFFF/neovim_config.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master
[credential]
        helper = store

C:\Users\admin\AppData\Local\nvim>
@0x7FFFFFFFFFFFFFFF
Copy link
Author

Btw, this repository is in good state and I can push or pull without any issue.

@rhysd
Copy link
Owner

rhysd commented Aug 3, 2020

Thanks for the report. Is what you tried as follows?

git clone git@github.com:0x7FFFFFFFFFFFFFFF/neovim_config.git
cd neovim_config/
git brws

And how did you prepare git-brws binary? (I guess you downloaded it from releases page)

At first I want to reproduce this on Windows.

@0x7FFFFFFFFFFFFFFF
Copy link
Author

0x7FFFFFFFFFFFFFFF commented Aug 3, 2020

I tried the commands you provided.

C:\my_projects>git clone git@github.com:0x7FFFFFFFFFFFFFFF/neovim_config.git
Cloning into 'neovim_config'...
remote: Enumerating objects: 57, done.
remote: Counting objects: 100% (57/57), done.
remote: Compressing objects: 100% (41/41), done.
Receiving objects:  43a 24), reused 45 (delta 12), pack-reused 0R
Receiving objects: 100% (57/57), 42.26 KiB | 10.00 KiB/s, done.
Resolving deltas: 100% (24/24), done.

C:\my_projects>cd neovim_config

C:\my_projects\neovim_config>git-brws
Error: Broken URL 'ssh://git@github.com:0x7FFFFFFFFFFFFFFF/neovim_config.git': invalid port number

C:\my_projects\neovim_config>git-brws --version
0.11.9

C:\my_projects\neovim_config>

Yes, I grabbed the git-brws from the release page and put it in PATH. Btw, my testing repo is a private one. Does this matter?

@rhysd
Copy link
Owner

rhysd commented Aug 3, 2020

I see. https://github.com/0x7FFFFFFFFFFFFFFF/neovim_config seems a private repository. I'll try the commands with my private repository on Windows tomorrow.

@rhysd
Copy link
Owner

rhysd commented Aug 3, 2020

It may be related to that your name starts with number. I'll check it tomorrow.

@rhysd
Copy link
Owner

rhysd commented Aug 3, 2020

I could reproduce this. It is not depending on platform.

  1. git clone https://github.com/rhysd/git-brws.git && cd git-brws
  2. Replace https://github.com/rhysd/git-brws.git with git@github.com:0x7FFFFFFFFFFFFFFF/neovim_config.git in .git/config
  3. Run git brws

I think this is a bug when converting git@ abbreviated URL to ssh:// URL for parsing it correctly.

@rhysd rhysd added the bug label Aug 3, 2020
@rhysd rhysd changed the title Invalid port number on Windows 10 Invalid port number when user name starts with numbers Aug 4, 2020
@rhysd rhysd closed this as completed in 9404139 Aug 4, 2020
@0x7FFFFFFFFFFFFFFF
Copy link
Author

Thank you for the quick fix!

@0x7FFFFFFFFFFFFFFF
Copy link
Author

I confirmed it works now. Thanks again!

@rhysd
Copy link
Owner

rhysd commented Aug 5, 2020

FYI: v0.11.10 was released https://github.com/rhysd/git-brws/releases/tag/v0.11.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants