# Issues with authentication pushing rust crate

**URL:** <https://forum.gitea.com/t/issues-with-authentication-pushing-rust-crate/12257>\
**Category:** Install/Maintain/Configure\
**Created:** [June 10, 2026, 1:52pm UTC](https://forum.gitea.com/t/issues-with-authentication-pushing-rust-crate/12257 "2026-06-10T13:52:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![forgiteasoup](https://avatars.discourse-cdn.com/v4/letter/f/9de053/32.png) [@forgiteasoup](https://forum.gitea.com/u/forgiteasoup)\
**Post date:** [June 10, 2026, 1:52pm UTC](https://forum.gitea.com/t/issues-with-authentication-pushing-rust-crate/12257/1 "2026-06-10T13:52:42Z")

</div>

### 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](https://docs.gitea.com/usage/packages/cargo)
- 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](https://github.com/go-gitea/gitea/blob/19d1e1d33492000861cea7ca11104adfc90a7d02/services/packages/auth.go#L65) 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.
