Skip to content

[Bug] CLI allows creation of access tokens with existing name #26044

Closed
@lonix1

Description

@lonix1

Description

Suppose I try to create an access token with a name that already exists.

Using API endpoint users/NAME/tokens, response correctly shows:

access token name has been used already

Using the UI will correctly show:

temporary has been used as an application name already. Please use a new one.

But using the CLI gitea admin user generate-access-token will create a new token with the same name.

Access token was successfully created: 9d8600d1944444fb9330e938ff0871ec5825ce51

So the CLI allows multiple duplicate tokens.

Gitea Version

1.20.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

I'm using gitea in docker. Host has git 2.39.2

Operating System

linux

How are you running Gitea?

docker

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions