gh-gl-sync: Add option for using a gitlab oauth token - #1387
gh-gl-sync: Add option for using a gitlab oauth token#1387kwryankrattiger wants to merge 3 commits into
Conversation
Passing private base64 encoded ssh keys doesn't make sense in all context. When running the sync script as a cron from Gitlab itself using the temporary job token is better practice.
|
When using |
Co-authored-by: Tim Haines <thaines.astro@gmail.com>
|
@kwryankrattiger Is https://gitlab.spack.io/dav-sdk/gh-gl-sync the official repo for the github-sync component? |
yes, afaik that is the only place it is published now. |
| else: | ||
| url = url._replace(netloc=f"spackbot:{token}@" + url.netloc) | ||
|
|
||
| _write_secret(".git-credentials", urllib.parse.urlunparse(url) + "\n") |
There was a problem hiding this comment.
We need to update the gitlab remote repo name name to match what's in the credentials file. I'm not entirely certain why this is needed because everything I've seen indicates that the https://gitlab.spack.io should be enough to match. 🤷
| _write_secret(".git-credentials", urllib.parse.urlunparse(url) + "\n") | |
| self.gitlab_repo = urllib.parse.urlunparse(url) | |
| _write_secret(".git-credentials", self.gitlab_repo + "\n") |
Passing private base64 encoded ssh keys doesn't make sense in all context. When running the sync script as a cron from Gitlab itself using the temporary job token is better practice.