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

Import git ssh error silenced #914

Closed
wildum opened this issue May 23, 2024 · 2 comments · Fixed by #943
Closed

Import git ssh error silenced #914

wildum opened this issue May 23, 2024 · 2 comments · Fixed by #943
Labels
bug Something isn't working

Comments

@wildum
Copy link
Contributor

wildum commented May 23, 2024

The SSH key conversion does not surface the error: https://github.com/grafana/alloy/blob/main/internal/vcs/auth.go#L29

When this happens, the given ssh key will be ignored and the go-git will try to use the ssh-agent instead: https://github.com/go-git/go-git/blob/master/plumbing/transport/ssh/common.go#L39

This is not good:

  • if the key that I pass is wrong but the ssh-agent is correctly setup, then it will work but I won't know that I passed wrong information. It's also not using the auth method that I wanted.
  • if the key is wrong and the ssh-agent is not set, then I will get an error related to the ssh-agent. I won't know what's wrong my ssh key which makes it super hard to debug
@wildum wildum added the bug Something isn't working label May 23, 2024
@csh0101
Copy link

csh0101 commented May 28, 2024

what is ssh-agent?

@wildum
Copy link
Contributor Author

wildum commented May 28, 2024

It'a a key manager for SSH, have a look at https://smallstep.com/blog/ssh-agent-explained/

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

Successfully merging a pull request may close this issue.

2 participants