Problem
- cannot push a rust crate to package registry in organization (or simple user)
- fails with “split token failed”
- fails with both sparse and git indexes
- fails with package read/write token and a completely stacked read-write token (all privileges)
Scenario
- I configure my ~/.cargo/config.toml and respective credentials.toml per docs- Cargo Package Registry | Gitea Documentation
- I also try cargo login (where it fails as I can see in the logs)
routers/api/packages/api.go:109:CommonRoutes.verifyAuth.3() [E] Failed to verify user: split token failed- This is followed by a 401 unauthorized of course
Details
- You can see here in the gitea code where it will throw this error
- Easy enough to see that it should be taking 2 strings separated by a space but somehow fails
- rust should be properly passing this as the token is specified per docs as “Bearer biglongtokenhere”
My question is- what is the proper method then to authenticate and publish? I don’t have better logging yet from gitea to see what the issue is.