mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-09 21:10:00 -05:00
How do I enable password reset ? #936
Closed
opened 2025-11-02 03:42:20 -06:00 by GiteaMirror
·
19 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.1
v1.16.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.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
No Label
type/question
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#936
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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?
Originally created by @freedomtrain on GitHub (Aug 2, 2017).
How do I enable password reset ?
Thanks
@lunny commented on GitHub (Aug 3, 2017):
Password reset is enabled default.
@captn3m0 commented on GitHub (Dec 25, 2017):
You can reset password using the command line as well:
gitea admin change-password --username username --password PASSWORD@pinpox commented on GitHub (Jul 6, 2018):
@lunny It is not on the installation with Arch linux's AUR. At least I get an error saying it is disabled.
The command
gitea admin change-password --username username --password PASSWORDreturns an error:@lunny commented on GitHub (Jul 8, 2018):
you could use --config to indicate where is your app.ini
@Poikilos commented on GitHub (Jun 5, 2019):
@techknowlogick Why was this closed without an answer? There is no obvious setting in the sample app.ini: https://github.com/go-gitea/gitea/blob/master/custom/conf/app.ini.sample
The comments above do not answer the question. The OP did not ask how to reset a password using the command line interface, nor whether enabling password reset was default, but how to turn on the password reset feature. I am on a gitea repo now and the admin does not know how to turn on password reset (so it clearly isn't on by default--he doesn't know how to change it). If I click reset password, it says:
@dipyalov commented on GitHub (Jul 19, 2019):
I support @poikilos. Why is this a closed issue? I'm facing the same problem with no clue which config option to change.
@alexanderadam commented on GitHub (Jul 19, 2019):
I'm not a maintainer but this string isn't even in the source code.
@dipyalov are you sure that you are using the latest version, because there was also this PR that was merged in April.
Did his suggestion (
gitea admin change-password --username username --password PASSWORD --config CONFIG_PATH) not work?@jolheiser commented on GitHub (Jul 19, 2019):
@poikilos @dipyalov Password reset is only considered enabled when a mail service is set up, as that's how Gitea currently sends the account recovery.
If no mail service is set up, I believe the CLI is the only other way to do it, or have your admin change it for you and then you change it again after regaining access.
It's not ideal, but I think perhaps a nice future feature would be to then allow admins to force users to change their password, similar to how the CLI does.
@Poikilos commented on GitHub (Jul 20, 2019):
I was referring to Gitea Version: 1.8.1 (Go1.12.5). I'll tell him that lack of mail config may be the issue. Shouldn't the admin interface give some kind of warning (to configure mail) where the setting would be, instead of just hiding password reset the setting?
@Poikilos commented on GitHub (Jul 20, 2019):
@alexanderadam The whole point of this topic is that end users cannot reset their passwords. Again, this topic is not discussing manual intervention by admins.
@alexanderadam commented on GitHub (Jul 21, 2019):
Okay, then I probably misread binaryplease writing that he tested the admin command it without
--configand got an error. 😉IMHO it isn't possible to do this on a misconfigured system.
Because you can't add the email configuration without being an admin and you can't execute the gitea command.
So either the admin adds the email configuration like described in the config cheat sheet or he uses the command captn3m0 wrote about.
Or, to make this clear: the whole point should is, that asking your admin should be the first step if you are an end user and you encounter some problems on a particular installation (which is not only true for gitea).
@Poikilos commented on GitHub (Jul 21, 2019):
@alexanderadam
He's not the OP, and the command isn't something "disabled" (just malfunctioning in the case of one reply, which is off topic or a workaround at best). There is no need to be snarky. The issue is clear, and I've not misunderstood it, unless you or the OP can point to where there is a setting that disables the CLI workaround.
The OP could be an admin, and the admin on my instance doesn't know how to enable it. I'll ask again: Shouldn't the admin interface give some kind of warning (to configure mail) where the setting would be, instead of just hiding the password reset setting (or is it just hidden from users, also without a warning to admins)?
@jolheiser commented on GitHub (Jul 22, 2019):
@poikilos There is no setting for password resets. It is considered "enabled" when a mail service is configured, and "disabled" otherwise, as far as I can tell.
Perhaps a better error message could be given, at least to admins?
Password reset is disabled. Please contact your site administrator.seems reasonable to give to a user, since they don't need to know the inner workings.However, perhaps an admin should be given more context, such as
Please set up a mailing configuration to enable Password Resetor something similar?@VitaliyAT commented on GitHub (Aug 28, 2019):
When I try realize
gitea admin change-password --username username --password PASSWORDFor me it's:
root@TestLab:/usr/local/gitea/gitea# ./gitea admin change-password --username gitea --password gitea --config ./conf/app.iniI'v got this:
2019/08/28 22:14:26 ...s/setting/setting.go:831:NewContext() [F] Expect user 'gitea' but current user is: rootTry install and use Gitea on DSM Synology. First time it was OK - I'v got admin access, but after relogin "Wrong login or password". I already uninstall Gitea and reinstall it again - no luck, apologize all in data base.
It's looped problem. I need change password because it write me that it's wrong, but I can't change it because I need this password for change.
How can I reset all Gitea in my situation? I just in the beginning of it and can do it but don't know exactly how.
@jolheiser commented on GitHub (Aug 28, 2019):
This command would be to change the Gitea user named
giteaThis error is telling you that it is expecting you to run the command as the
giteasystem account rather than root.For further help, would you mind opening a new issue so as not to add on to this closed one? 😃
@Poikilos commented on GitHub (Aug 28, 2019):
@VitaliyAT Please read the detailed posts above clarifying that "How do I enable password reset" (for end users) is not the same as "How do I reset a password" (as admin). Consider deleting your comment and posting it in a new issue as jolheiser suggested instead, so that your comment does not further muddy this issue nor bury jolhheiser's proposed solution to this issue.
@gewure commented on GitHub (Nov 8, 2019):
honestly, this issue and the way of communication here bugs me.
many reasons:
#1 why close this twice, when its not resolved, as a question?!
#2 "further muddy this issue". nono, its not the users who are to blame here. Show some respect for people trying to advance documentation of gitea and solve problems they have.
#3 generally: the very most people writing github issues try to solve a problem they already tried solving hard before. most people don't even write an issue then. Its maybe 1-5% of users who write at all --- and being greeted with "don't write!!" adds to the general mood of not asking. Which then results in more question, because none gives a **** about resolving the issues, as meant by the author (who, in most cases is no expert on the matter - because of lack of meaningful documentation).
Also "is enabled by default" is simply not true as an answer, because a working mailserver-conf is a requirement and that is by default not enabled.
@poikilos "this topic is not discussing manual intervention by admins." well then, to be honest: it should do so!!
Sorry to comment on a closed one, but .. not that much sorry. Just had the same problem, read the whole issue, am now not really any more informed, other than i got the impression one shouldn't ask questions/write issues ...and (funnily enough) even if someone understands what the real question is ("how to manually change password as admin"), there is NO answer to it ':D
like.. why bother with writing answers, if there is no verbose information in it? Not worth the typing.
whatever. Just my 2 Cents & impression, being a little frustrated. take it as feedback to improve.
@jolheiser commented on GitHub (Nov 8, 2019):
For anyone who finds this issue, I would like to make another comment here at the bottom to address the aggregation of scenarios in this thread.
How can I enable password reset / How can a user's password be changed?
The original question
There is no setting for password resets. It is considered "enabled" when a mail service is configured, and "disabled" otherwise.
Site Administration -> User Accountspage and editing a user.Keep in mind most commands will also need a global flag to point the CLI at the correct configuration.
Settings -> Accountpage (this method requires you to know your password.) Maybe not entirely relevant to this thread, but posted here for completeness.Forgot Passwordlink, assuming there is a configured mail service.@Poikilos commented on GitHub (Nov 9, 2019):
@gewure,
A different question was asked than the original issue. Posting separate issues will not help the issue get resolved. I'm not a maintainer and I'm not trying to be unwelcoming. I'm a user trying to get my problem solved. I didn't say for @VitaliyAT not to ask questions, I said post a separate issue, so both problems can get addressed instead of none.
The maintainers posting how to change the password from the command line then closing the issue is a misunderstanding of the issue or need for GUI solutions or at least meaningful warnings pointing to a solution--see https://github.com/go-gitea/gitea/issues/2247#issuecomment-499055290 above, which led to me creating a separate issue: https://github.com/go-gitea/gitea/issues/8017. Closing the issue citing a command doesn't solve the original GUI problem, that's what was saying. It doesn't mean that command line tips are invalid, it just means they don't solve the issue. Again, I'm not trying to be unwelcoming. I'm a user trying to get my problem solved.