It's common to use multiple ssh keys for authenticating with various projects. With a non-default hostname for github.com, git metrics fails with,
$ git metrics -v pull
2025-02-06T21:54:48.350455Z ERROR git_metrics::backend::git2: unable to pull metrics: Error { code: -1, klass: 12, message: "failed to resolve address for github.com-applied: Name or service not known" }
unable to pull metrics
failed to resolve address for github.com-applied: Name or service not known; class=Net (12)
Minimal ~/.ssh/config
Host github.com-example
Hostname github.com
Repro steps:
git remote set-url origin git@github.com-example:jdrouet/git-metrics.git
git pull origin main # works
git metrics pull # fails
It's common to use multiple ssh keys for authenticating with various projects. With a non-default hostname for
github.com,git metricsfails with,Minimal
~/.ssh/configRepro steps: