Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Rio git ssh on custom port trying to connect to port 22 instead of custom port #1023

Open
citananda opened this issue Apr 6, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@citananda
Copy link

Describe the bug
When I rio run from git on a custom port (eg 30022), rio is trying to git clone to port 22

To Reproduce

  1. rio run --build-clone-secret gitcredential-ssh [email protected]:30022/my-repo/my-project.git

Expected behavior
git access to port 30022

Kubernetes version & type (GKE, on-prem): kubectl version

Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.4", GitCommit:"8d8aa39598534325ad77120c120a22b3a990b5ea", GitTreeState:"clean", BuildDate:"2020-03-12T21:03:42Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.4", GitCommit:"8d8aa39598534325ad77120c120a22b3a990b5ea", GitTreeState:"clean", BuildDate:"2020-03-12T20:55:23Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"linux/amd64"}

Type:
Rio version: rio info

Rio Version: v0.7.0 (4afd4901)
Rio CLI Version: v0.7.0 (4afd4901)
Cluster Domain: XXX.on-rio.io
Cluster Domain IPs: xxxx
System Namespace: rio-system
Wildcard certificates: XXX.on-rio.io(true)

Additional context
rio ps
output:

Failed to watch git repo: Warning: Permanently added 'my.domain,my.ip' (ECDSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
: exit status 128(Error)

ssh [email protected] -p 30022
output:

PTY allocation request failed on channel 0
Welcome to GitLab, @root!
Connection to my.domain closed.
@citananda citananda added the bug Something isn't working label Apr 6, 2020
@citananda citananda changed the title Rio git ssh on custom port going on 22 Rio git ssh on custom port trying to connect to port 22 instead of custom port Apr 6, 2020
@vincent99
Copy link
Contributor

Does regular "git clone" work with a string like that? There's no way to differentiate it from a regular user@host:path string where the first path segment happens to be a number.

I don't know if we support it already or not but you'd have to use something like thessh://user@host:port/path form instead.

@citananda
Copy link
Author

Yes
git clone ssh://git@my-domain:30022/my-repo/my-project.git
output:

git clone ssh://git@my-domain:30022/my-repo/my-project.git
Cloning into 'my-project'...
remote: Enumerating objects: 7106, done.
remote: Counting objects: 100% (7106/7106), done.
remote: Compressing objects: 100% (2343/2343), done.
remote: Total 7106 (delta 4472), reused 7033 (delta 4405), pack-reused 0
Receiving objects: 100% (7106/7106), 51.27 MiB | 51.67 MiB/s, done.
Resolving deltas: 100% (4472/4472), done.

@citananda
Copy link
Author

citananda commented Apr 6, 2020

I tried ssh://user@host:port/path and I get this problem.

Failed to watch git repo: Warning: Permanently added '[my.domain]:30022,[my.ip]:30022' (ECDSA) to the list of known hosts.
Load key "/tmp/ssh-key557418727": invalid format
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
: exit status 128(Error)

If RIO don't support this format, do you plan to soon ?

@citananda
Copy link
Author

After some test, here is the situation.
Using repo: ssh://[email protected]:30022/my-repo/my-project.git is not connecting on port 30022 but on port 22

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants