Skip to content

pipeline config failing to validate remote with alias ssh hostnames #4185

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

Closed
anfibiacreativa opened this issue Aug 6, 2024 · 6 comments · Fixed by #4237 or #4262
Closed

pipeline config failing to validate remote with alias ssh hostnames #4185

anfibiacreativa opened this issue Aug 6, 2024 · 6 comments · Fixed by #4237 or #4262
Assignees
Milestone

Comments

@anfibiacreativa
Copy link
Member

anfibiacreativa commented Aug 6, 2024

var gitHubRemoteGitUrlRegex = regexp.MustCompile(`^git@github\.com:(.*?)(?:\.git)?$`)

The above line causes azd pipeline config to generate the file though show error message of fail on remote validation, when user has multiple ssh config hostnames with error message ERROR: ensuring git remote: not a GitHub host. The file gets locally generated but the process of committing it is aborted/interrupted.

To reproduce, the user needs to have at least 2 different ssh configs that override the host.
Clone a repo.

Run azd pipeline config. Validation of the host fails.

A suggestion could be to either detect hostname from config or require it's passed as argument.

Additionally, error message can be improved to "GitHub host not found. If you have aliases for hostnames...(do this)"

System details:
azd version 1.9.5 (commit cd2b7af)
MacOs Sonoma 14.6

cc: @kristenwomack

@rajeshkamal5050
Copy link
Contributor

@vhvb1989 can you take a look?

@vhvb1989
Copy link
Member

vhvb1989 commented Aug 7, 2024

Hello @anfibiacreativa

Can you please elaborate about this:

the user needs to have at least 2 different ssh configs that override the host.

I don't understand if you are using git config to override host names or if you are setting ssh keys depending on the host name.

Can you also share, the error you are getting from azd output?

@anfibiacreativa
Copy link
Member Author

anfibiacreativa commented Aug 9, 2024

I have one ssh keys config for EMU and one for my regular open source account, that override the hostname.

error

And this is probably because

Screenshot 2024-08-09 at 9 53 05 AM

@rajeshkamal5050 rajeshkamal5050 added this to the Backlog milestone Aug 21, 2024
@vhvb1989
Copy link
Member

@anfibiacreativa , can you try with this: #4237 (comment) please

@vhvb1989 vhvb1989 modified the milestones: Backlog, Aug 2024 Aug 23, 2024
@anfibiacreativa
Copy link
Member Author

anfibiacreativa commented Aug 27, 2024

Unfortunately not
Screenshot 2024-08-27 at 4 38 27 PM

@vhvb1989
Copy link
Member

vhvb1989 commented Sep 4, 2024

@anfibiacreativa please try again with daily build or once 1.10.0 is out

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