You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Verify repository exists before attempting to clone it #684
» git push
Username for 'https://github.com': flip111
Password for 'https://flip111@github.com':
Everything up-to-date
Doesn't work
» spago publish
Reading Spago workspace configuration...
✅ Selecting package to build: foldable-traversable-extra
Downloading dependencies...
Building...
Src Lib All
Warnings 0 0 0
Errors 0 0 0
✅ Build succeeded.
Passed preliminary checks.
Pushing tag 'v0.0.4' to the remote
Username for 'https://github.com': flip111
Password for 'https://flip111@github.com':
Building again with the build plan from the solver...
Building...
Src Lib All
Warnings 0 0 0
Errors 0 0 0
✅ Build succeeded.
✅ Ready for publishing. Calling the registry..
✅ Registry accepted the Publish request and is processing...
Logs from the Registry pipeline:
2024-01-22T13:44:36.796Z Received Publish request, job id: c15beb1c-580f-4f2e-a269-c7d77a4f43bf
2024-01-22T13:44:36.806Z Fetching {
"githubOwner": "flip111",
"githubRepo": "foldable-traversable-extra"
}
2024-01-22T13:44:36.973Z Failed to clone git tag: Cloning into '/tmp/tmp-2210958-ehZufsMfSvEF/foldable-traversable-extra'...
fatal: could not read Username for 'https://github.com': No such device or address
2024-01-22T13:44:36.975Z Failed to clone repository flip111/foldable-traversable-extra at ref v0.0.4
❌ Registry finished processing the package, but it failed. Please fix it and try again.
I don't have 2fa authenticated on github yet, not sure if that's related but i just mentioned it in case.
Failed to clone git tag: Cloning into '/tmp/tmp-2210958-ehZufsMfSvEF/foldable-traversable-extra'...\nfatal: could not read Username for 'https://github.com': No such device or address",
What was actually output to the console from the Spago publish? The registry generally comments this line:
"Failed to clone repository flip111/foldable-traversable-extra at ref v0.0.4"
What error would y'all want instead? Some kind of preflight check that the repository exists, and an error "Repository flip111/foldable-traversable-extra does not exist."?
The errors returned to the user are the ones appearing in the API call, and the first one is pretty confusing: "Failed to clone git tag: Cloning into '/tmp/tmp-2210958-ehZufsMfSvEF/foldable-traversable-extra'...\nfatal: could not read Username for 'https://github.com': No such device or address"
I think a simple git ls-remote would be a good preflight check, with interaction disabled via GIT_TERMINAL_PROMPT=0 since if the repo doesn't exist GitHub will prompt for login in case it's private.
Activity
f-f commentedon Jan 22, 2024
This is a Registry error, see the logs when we query the API using the job id from your logs:
That tag was created at
13:43, and the logs happen at13:44, so I think this is a bug?I'll move the issue to the registry repo.
f-f commentedon Jan 22, 2024
@thomashoneyman any clue what might be happening here? The spago config seems alright
thomashoneyman commentedon Jan 22, 2024
The first error is strange:
We clone the repository early in publishing:
registry-dev/app/src/App/API.purs
Line 370 in ef989a1
Here's the implementation of that
fetchcall:registry-dev/app/src/App/Effect/Source.purs
Lines 78 to 81 in ef989a1
Under the hood it's just calling
giton the command line:registry-dev/app/src/App/CLI/Git.purs
Lines 74 to 80 in ef989a1
thomashoneyman commentedon Jan 22, 2024
@f-f @flip111 The error is not good, but I would guess this is happening because the repository field in the Spago config is incorrect:
https://github.com/flip111/purescript-foldable-traversable-extra/blob/d7e3c78766831c1d8e52091e34226bcdbb591209/spago.yaml#L18
It lists the repository as
foldable-traversable-extrabut the actual repository has apurescriptprefix:https://github.com/flip111/purescript-foldable-traversable-extra
flip111 commentedon Jan 22, 2024
Thank you for looking into this. I changed the repo name and it worked. Let's keep this issue open to make a better error message.
f-f commentedon Jan 22, 2024
Ah indeed! Thanks Thomas. I guess both the registry and spago should check for the existence of the repo before doing their thing.
thomashoneyman commentedon Jan 22, 2024
What was actually output to the console from the Spago publish? The registry generally comments this line:
"Failed to clone repository flip111/foldable-traversable-extra at ref v0.0.4"What error would y'all want instead? Some kind of preflight check that the repository exists, and an error "Repository
flip111/foldable-traversable-extradoes not exist."?f-f commentedon Jan 22, 2024
Yeah, errors from
git cloneare pretty generic, so we can offer a much better error just running this simple checkf-f commentedon Jan 22, 2024
The errors returned to the user are the ones appearing in the API call, and the first one is pretty confusing:
"Failed to clone git tag: Cloning into '/tmp/tmp-2210958-ehZufsMfSvEF/foldable-traversable-extra'...\nfatal: could not read Username for 'https://github.com': No such device or address"thomashoneyman commentedon Jan 22, 2024
I think a simple
git ls-remotewould be a good preflight check, with interaction disabled viaGIT_TERMINAL_PROMPT=0since if the repo doesn't exist GitHub will prompt for login in case it's private.[-]Can not clone during publish[/-][+]Verify repository exists before attempting to clone it[/+]fix #684