This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
fix error: "Aborted: could not find any git remote pointing to a GitHub repository" #93
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Error details
I faced below error on GitHub Actions.
I looked into this error and found that it occurs in the following part of the hub command.
https://github.com/github/hub/blob/363513a0f822a8bde5b620e5de183702280d4ace/github/localrepo.go#L256
Finally, I found that below error occured.
https://github.com/github/hub/blob/363513a0f822a8bde5b620e5de183702280d4ace/git/url.go#L26
According to RFC3986, the use of
[
and]
is not allowed in userinfo subcomponent of an URL.(ref: https://www.ietf.org/rfc/rfc3986.txt "3.2.1. User Information")
GITHUB_ACTOR
environment variable may contain[
or]
, such asgithub-pages[bot]
.Thus, the following line produces an invalid URL.
pull-request/entrypoint.sh
Line 26 in 65785d9
Suggestion
I found the GitHub official documentation that describe the repository url of below format.
https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#http-based-git-access-by-an-installation
So I have modified it as such.
Presumably, when using tokens for git / hub command, any user name will work.