Open seantfish opened 1 week ago
Could not determine ref type of version: fatal: could not read Username for 'https://<ENTERPRISE_URL>/': No such device or address
is the address valid? It uses the GitHub server URL from the GITHUB_SERVER_URL
(see the default environment variables here) here: https://github.com/ros-tooling/action-ros-ci/blob/8bcafc257f491574fe99ddcfaf9e9a02757ca694/src/action-ros-ci.ts#L631
Now that I'm looking at the code, though, it's probably because the code that sets up authentication using the provided token uses github.com
:
It should use the URL from the GITHUB_SERVER_URL
environment variable, which would need to be stripped of https://
in some cases. I've quickly implemented it, see #926. Please give it a try using action-ros-ci@christophebedard/token-auth-use-github-server-url-env-var
. I assume you can easily mirror the branch into your enterprise server.
This does mean you couldn't access private repos on github.com from an enterprise server using a token from github.com saved in the enterprise server, but I don't know if that's a common use-case.
Thank you @christophebedard! The branch solved the issue. I agree that private repos from github.com while on GitHub Enterprise seems unlikely, though perhaps one day someone will make an issue for this. I imagine this would require a fair amount of restructuring to work.
Description
I am using a mirrored action-ros-ci repository to use on an Enterprise server. The action fails due to an issue seemingly related with Git and the way credentials are handled.
Expected Behavior
What I would expect is that this error would not happen and it would continue on into the build process.
Actual BehaviorWhen attempting to run the following:
The action fails at:
To Reproduce
Have the Git repository on an Enterprise server and run the above GitHub action.
Navigate to details of failed action
Look under
Invoking: bash -c,vcs import --force --recursive src/ < package.repo
System (please complete the following information)
Additional context
There are no .repos dependencies specified for this repository.
This seems to possibly be an intersection of #533, #691, and #835.
I know this is hard to reproduce and I am happy to help. I am not very experienced with TypeScript however.