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

Using SSH in Github dependency resolutions #211

Closed
Westbrook opened this issue Apr 22, 2021 · 3 comments · Fixed by #212
Closed

Using SSH in Github dependency resolutions #211

Westbrook opened this issue Apr 22, 2021 · 3 comments · Fixed by #212

Comments

@Westbrook
Copy link
Contributor

When using a config similar to that found in the README.md that leverages a Github repo via SSH (included at the bottom of the issue for reference), I am running into issues where tachometer attempts to install the dependency from the local file system. It seems that this stems from this code:

https://github.com/Polymer/tachometer/blob/2b296a0a0ab57ecbadc3c3625a499570fb5e0c83/src/versions.ts#L366-L380

It appears to expect a protocol reference at the beginning of the repo value for the dependency, and when it doesn't fine one it assumes the dependency is local. Would a naive return on str.search('git@') === 0 be an acceptable addition to this logic? Or is there a better path forward for adding support for SSH here? Or am I missing something all together?

Config Reference:

{
  "benchmarks": [
    {
      "name": "my-benchmark",
      "url": "my-benchmark.html",
      "packageVersions": {
        "label": "my-label",
        "dependencies": {
          "my-package": {
            "kind": "git",
            "repo": "git@github.com:MyOrg/my-repo.git",
            "ref": "my-branch",
            "subdir": "packages/my-package",
            "setupCommands": [
              "npm install",
              "npm run build"
            ]
          }
        },
      }
    },
  ],
}
@aomarks
Copy link
Member

aomarks commented Apr 22, 2021

Oops, yeah that's just a bug. Should be fixed by #212

For now you can write ssh://git@github.com/MyOrg/my-repo.git

@aomarks
Copy link
Member

aomarks commented Apr 22, 2021

Fixed in 0.5.9 just published

@Westbrook
Copy link
Contributor Author

Thanks!!!

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

Successfully merging a pull request may close this issue.

2 participants