For synching with GitHub over ssh (although this may be the same with other providers but we've only seen it happen with GitHub), our git remote sync over ssh code does not correctly handle the cases where:
- A user puts an https url in the remote url field like:
storage:
development:
remote: "https://github.com/org-name/some-test-repo.git"
- A user does not put the username in the remote url even if the username is in the credentials config:
storage:
development:
remote: "github.com/org-name/some-test-repo.git"
credentials: "github"
credentials:
github:
type: ssh
ssh:
user: git
It seems we should be:
- Trimming any protocol (ie
https:// from the remote url if credential type set == ssh
- Prepending the username to the remote url before trying to pull/push if set in the credentials (ie:
[email protected]/owner/repo.git
- If both
ssh.user is set AND the username is set in the remote url like [email protected] AND they differ, then we should error at validation time
Then we also should update the docs at https://docs.flipt.io/v2/configuration/storage#git-remotes and https://docs.flipt.io/v2/configuration/storage#ssh
For synching with GitHub over ssh (although this may be the same with other providers but we've only seen it happen with GitHub), our git remote sync over ssh code does not correctly handle the cases where:
It seems we should be:
https://from the remote url if credential type set == ssh[email protected]/owner/repo.gitssh.useris set AND the username is set in the remote url like[email protected]AND they differ, then we should error at validation timeThen we also should update the docs at https://docs.flipt.io/v2/configuration/storage#git-remotes and https://docs.flipt.io/v2/configuration/storage#ssh