Codeberg/Community
54
325
Fork
You've already forked Community
12

Credentials are incorrect or expired #2149

Open
opened 2025年09月25日 21:38:36 +02:00 by leonp · 8 comments

Comment

Hi there,

I’ve just set up a new elementary install.

I was able to push to my repo until this afternoon, when I get this message:

remote: Credentials are incorrect or have expired. Retry your command or see https://codeberg.org/forgejo/forgejo/issues/2809 for more information
fatal: Authentication failed for...

I’ve looked at both previous tickets and tried adding the credentials with my Codeberg username in .gitconfig, but this does not work.

Thanks,

Leon

### Comment Hi there, I’ve just set up a new elementary install. I was able to push to my repo until this afternoon, when I get this message: ``` remote: Credentials are incorrect or have expired. Retry your command or see https://codeberg.org/forgejo/forgejo/issues/2809 for more information fatal: Authentication failed for... ``` I’ve looked at both previous tickets and tried adding the credentials with my Codeberg username in .gitconfig, but this does not work. - https://codeberg.org/forgejo/forgejo/issues/2809 - https://codeberg.org/Codeberg/Community/issues/2038 Thanks, Leon

Hi, does this issue still persist? (This error could sometimes be shown temporary).

If it still persists how did you configure git to send your codeberg credentials?

Hi, does this issue still persist? (This error could sometimes be shown temporary). If it still persists how did you configure git to send your codeberg credentials?
Author
Copy link

Hi Gusted,

Thanks for responding. Still happens, unfortunately.

I haven’t even set up credentials in git – it prompts for the password as I have added my Codeberg username to .gitconfig:

[credential "repo URL"]
 username = leonp

I think this is an Elementary OS config problem – I’ve had no problems connecting from MacOS, Ubuntu and Mint.

Hi Gusted, Thanks for responding. Still happens, unfortunately. I haven’t even set up credentials in git – it prompts for the password as I have added my Codeberg username to `.gitconfig`: ``` [credential "repo URL"] username = leonp ``` I think this is an Elementary OS config problem – I’ve had no problems connecting from MacOS, Ubuntu and Mint.
Author
Copy link

I’m also getting this on a brand new Ubuntu install, so looks like it’s something at Codeberg’s end, not an Elementary thing.

I’m also getting this on a brand new Ubuntu install, so looks like it’s something at Codeberg’s end, not an Elementary thing.
Author
Copy link

I have got around this by creating a new Codeberg user and adding them as a collaborator. I can now push and pull to and from the repo, so this is definitely something at the Codeberg end.

I have got around this by creating a new Codeberg user and adding them as a collaborator. I can now push and pull to and from the repo, so this is definitely something at the Codeberg end.

@leonp wrote in #2149 (comment):

I haven’t even set up credentials in git – it prompts for the password as I have added my Codeberg username to .gitconfig:

Could you give a bit more detail about your setup for setting the credentials? I believe there's a issue here were either the password is not sent or maybe even the incorrect password is being sent as in those two cases this error message is being returned.

@leonp wrote in #2149 (comment):

I have got around this by creating a new Codeberg user and adding them as a collaborator. I can now push and pull to and from the repo, so this is definitely something at the Codeberg end.

Did you setup the credentials for this user in the same way?

@leonp wrote in https://codeberg.org/Codeberg/Community/issues/2149#issuecomment-7387636: > I haven’t even set up credentials in git – it prompts for the password as I have added my Codeberg username to `.gitconfig`: Could you give a bit more detail about your setup for setting the credentials? I believe there's a issue here were either the password is not sent or maybe even the incorrect password is being sent as in those two cases this error message is being returned. @leonp wrote in https://codeberg.org/Codeberg/Community/issues/2149#issuecomment-7400344: > I have got around this by creating a new Codeberg user and adding them as a collaborator. I can now push and pull to and from the repo, so this is definitely something at the Codeberg end. Did you setup the credentials for this user in the same way?
Author
Copy link

Hi @Gusted thanks for looking into this again,

Could you give a bit more detail about your setup for setting the credentials?

I set the credentials up ages ago when I created my Codeberg account. When I set up elementary I:

  • Installed Git
  • Cloned the repo
  • Committed and pushed a change
  • Codeberg asked for my user name and password
  • It worked the first time
  • I tried again later and got the error message

When I set up Ubuntu I:

  • Installed Git
  • Cloned the repo
  • Committed and pushed a change
  • Codeberg asked for my user name and password
  • I got the error message
  • I ran git config --global credential.helper store
  • I updated .gitconfig with:
[credential "repo address"]
 username = [my user name]
  • I tried to push again
  • I was only asked for my password
  • Entered password
  • Got error message again

Then I set up a new user on Codeberg and made them a collaborator. After that, I:

  • Committed and pushed a change
  • Was asked for user name and password
  • Entered the new user credentials
  • The push worked

On the next push, I:

  • Ran git config --global credential.helper store
  • Entered the new credentials again

Since then I push as per normal and it works as expected. Git doesn’t ask for the credentials.

Note that my existing laptop has continued to work as expected with stored, old login credentials.

Thanks, L

Hi @Gusted thanks for looking into this again, > Could you give a bit more detail about your setup for setting the credentials? I set the credentials up ages ago when I created my Codeberg account. When I set up elementary I: - Installed Git - Cloned the repo - Committed and pushed a change - Codeberg asked for my user name and password - It worked the first time - I tried again later and got the error message When I set up Ubuntu I: - Installed Git - Cloned the repo - Committed and pushed a change - Codeberg asked for my user name and password - I got the error message - I ran `git config --global credential.helper store` - I updated `.gitconfig` with: ``` [credential "repo address"] username = [my user name] ``` - I tried to push again - I was only asked for my password - Entered password - Got error message again Then I set up a new user on Codeberg and made them a collaborator. After that, I: - Committed and pushed a change - Was asked for user name and password - Entered the new user credentials - The push worked On the next push, I: - Ran `git config --global credential.helper store` - Entered the new credentials again Since then I push as per normal and it works as expected. Git doesn’t ask for the credentials. Note that my existing laptop has continued to work as expected with stored, old login credentials. Thanks, L

That setup looks normal and that error then only should arise when the password being sent is the incorrect one (especially if the setup does work for a collaborator user). If you use the store credential helper you should be able to check ~/.git-credentials and verify that this is indeed the password for your Codeberg account.

That setup looks normal and that error then only should arise when the password being sent is the incorrect one (especially if the setup does work for a collaborator user). If you use the `store` credential helper you should be able to check `~/.git-credentials` and verify that this is indeed the password for your Codeberg account.

I experienced this issue and determined that codeberg was not accepting the password stored in my password manager. Reseting the password resolved the issue.

I experienced this issue and determined that codeberg was not accepting the password stored in my password manager. Reseting the password resolved the issue.
Sign in to join this conversation.
No Branch/Tag specified
main
No results found.
Labels
Clear labels
accessibility

Reduces accessibility and is thus a "bug" for certain user groups on Codeberg.
bug

Something is not working the way it should. Does not concern outages.
bug
infrastructure

Errors evidently caused by infrastructure malfunctions or outages
Codeberg

This issue involves Codeberg's downstream modifications and settings and/or Codeberg's structures.
contributions welcome

Please join the discussion and consider contributing a PR!
docs

No bug, but an improvement to the docs or UI description will help
duplicate

This issue or pull request already exists
enhancement

New feature
infrastructure

Involves changes to the server setups, use `bug/infrastructure` for infrastructure-related user errors.
legal

An issue directly involving legal compliance
licence / ToS

involving questions about the ToS, especially licencing compliance
please chill
we are volunteers

Please consider editing your posts and remember that there is a human on the other side. We get that you are frustrated, but it's harder for us to help you this way.
public relations

Things related to Codeberg's external communication
question

More information is needed
question
user support

This issue contains a clearly stated problem. However, it is not clear whether we have to fix anything on Codeberg's end, but we're helping them fix it and/or find the cause.
s/Forgejo

Related to Forgejo. Please also check Forgejo's issue tracker.
s/Forgejo/migration

Migration related issues in Forgejo
s/Pages

Issues related to the Codeberg Pages feature
s/Weblate

Issue is related to the Weblate instance at https://translate.codeberg.org
s/Woodpecker

Woodpecker CI related issue
security

involves improvements to the sites security
service

Add a new service to the Codeberg ecosystem (instead of implementing into Gitea)
upstream

An open issue or pull request to an upstream repository to fix this issue (partially or completely) exists (i.e. Gitea, Forgejo, etc.)
wontfix

Codeberg's current set of contributors are not planning to spend time on delegating this issue.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/Community#2149
Reference in a new issue
Codeberg/Community
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?