Android-Password-Store icon indicating copy to clipboard operation
Android-Password-Store copied to clipboard

[BUG] Custom port in git http url not supported

Open viric opened this issue 2 years ago • 5 comments
trafficstars

Describe the bug

If the git server url is http with a port (http://1.2.3.4:1234) the program suggests to prepend ssh:// in front. It says "Potential problematic url, click Ok to fix" and, moreover, there is no other option than click Ok. Then it prepends ssh://.

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to 'Edit Git server settings'
  2. Type an http url with port 'http://1.2.3.4:1234/'
  3. Accept
  4. See error complaining about potential wrong URL, forcing to Ok

Expected behavior

Accept the url normally. It is well formed.

I guess the aid is meant for some non-http urls; even in that case, the "fix" of prepending ssh:// should be optional.

Screenshots

No response

Device information

  • OS: Android 13
  • App version: 1.13.5

Additional context

No response

viric avatar Apr 30 '23 17:04 viric

This should be relatively straightforward to fix, the code that's failing is here.

msfjarvis avatar Apr 30 '23 19:04 msfjarvis

What I want to do is to be able to use a git server that I just run in my desktop. Be it "git daemon" (git:// is disallowed) or "git instaweb" (http doesn't work unless on port 80).

Those two paths not working leaves me with no git clone possible, I think.

viric avatar May 08 '23 20:05 viric

What I want to do is to be able to use a git server that I just run in my desktop. Be it "git daemon" (git:// is disallowed) or "git instaweb" (http doesn't work unless on port 80).

Those two paths not working leaves me with no git clone possible, I think.

You can do it via SSH but yes if you're trying to use HTTPS then it is currently not possible.

msfjarvis avatar May 08 '23 22:05 msfjarvis

I'd be happy with http or git, which I cannot use. As these are not working I ended up using ssh with a command="git-shell ..." parameter in the authorized_keys, but it annoys me that I have to give shell access to my account to password store, for a simple git sync.

Fixing this http:// port bug would be good.

viric avatar May 10 '23 18:05 viric

I have a self hosted git server that runs on port 8443 because my ISP doesn't allow me to use 443 and I can use pass everywhere except on Android.

Here is an example URL: https://something.example.com:8443/user/pass-repo.git

It works on the command-line (Linux) but it doesn't work on Android.

cizordj avatar May 29 '24 20:05 cizordj