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

Problem cloning repositories on self hosted runners #16

Closed
Tjitse-E opened this issue Apr 20, 2021 · 4 comments · Fixed by #18
Closed

Problem cloning repositories on self hosted runners #16

Tjitse-E opened this issue Apr 20, 2021 · 4 comments · Fixed by #18
Labels
bug Something isn't working

Comments

@Tjitse-E
Copy link
Contributor

Describe the bug

I'm having problems with the Github authentication, the clone action doesn't work:

Started updating abcd.nl repo
Cloning abcd.nl.
Error: Action failed because of: Error: Cloning into '/home/runner/work/.github/.github/clones/abcd.nl'...
fatal: could not read Username for 'https://github.com': No such device or address

I traced the problem back to steveukx/git-js#594, altough there the issue was caused by actions/checkout@v1. I'm using actions/checkout@v2.

How to Reproduce

I'm using private repositories, so I cannot specify the steps to reproduce. Probably it has something to do with my self hosted runner setup.

@Tjitse-E Tjitse-E added the bug Something isn't working label Apr 20, 2021
@Tjitse-E
Copy link
Contributor Author

@derberg what do you think of this solution? https://github.com/Tjitse-E/global-workflows-support/commit/65bcc73644877b8e9e94ad8e25026c18fd4c29a3. Using the github token to clone the repo via HTTPS works for me.

@derberg
Copy link
Owner

derberg commented Apr 20, 2021

@Tjitse-E sounds good, I never thought about using it on private repos, but of course it makes sense 😄

Just solution should be provided in different place. The clone function should be extended with an additional token argument and the magic of creating authenticated URL should be in git.js in the function. I guess you could just move this https://github.com/Tjitse-E/global-workflows-support/blob/main/lib/git.js#L16-L19 to utils and reuse in these 2 functions

@Tjitse-E
Copy link
Contributor Author

Tjitse-E commented Apr 20, 2021

Ok, I will see if I have some time to create a PR for this in the coming days.

@derberg
Copy link
Owner

derberg commented May 20, 2021

@Tjitse-E this is not supported with 0.3.0 https://github.com/derberg/global-workflows-support/releases/tag/v0.3.0

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