Known Issue: Unable to Log in - "Cannot Create Account"
DRAFT DOCUMENTATION: This documentation is currently in draft form and may not be fully tested and correct. Please verify all procedures before use and report any issues or inaccuracies. |
Purpose
This document explains a known issue with the Pagure migrator where user accounts are created but not properly enabled. The issue presents itself when an affected user attempts to log in to Fedora Forge. Instead of a successful login, the user receives an error message stating that they are unable to create their account and must contact a system administrator for assistance. This occurs because the user’s account has been created by the migrator but has not been finalized in the same way as a new account created via the Forgejo UI.
If you encounter this issue, please file a ticket on the |
Scope
This document applies to Fedora Forge administrators who need to resolve login issues for users affected by the Pagure migrator. The procedures outlined here are specific to the Fedora Forge implementation.
This issue is specific to the Fedora Forge implementation of the Pagure migrator, as it is the only version that automatically creates user accounts. Other Forgejo instances do not exhibit this behavior as their migrators do not have this functionality. |
Prerequisites
-
Administrator Privileges: The user must possess administrator privileges on Fedora Forge to perform these procedures.
-
Access to Fedora System: For the automated workaround, access to a Fedora system with Python installed is required.
Procedure
Manual Workaround (For Individual Users)
An administrator can manually fix this issue for a single user by performing the following steps in the Forgejo UI:
-
Log in as a Fedora Forge administrator to Fedora Forge.
-
Navigate to the Admin Panel.
-
Go to the User Management section.
-
Find and click on the user’s account to open their settings.
-
Without making any changes, click the "Update user account" button to save changes.
Automated Workaround (For Multiple Users)
For administrators dealing with a large number of affected users, the update_users.py
script provides an automated solution. This script automates the tedious manual process of visiting each user’s edit page and saving changes, ensuring that all migrated accounts are properly enabled.
Prerequisites for Automated Workaround
-
Administrator Access: You must have administrator privileges on Fedora Forge and be a member of the
sysadmin-forge
group in Fedora Accounts -
Python Environment: Python 3.6 or later with pip installed
-
Required Dependencies: The following Python packages must be installed:
-
selenium
- For web browser automation -
webdriver-manager
- For automatic browser driver management -
click
- For command-line interface
-
-
Browser Requirements: Firefox browser installed on your system
-
Manual Login: You will need to manually log in with your Fedora Accounts credentials during script execution
Installation
Installing Required Dependencies
It’s recommended to use a Python virtual environment to avoid conflicts with system packages. Create and activate a virtual environment, then install the required packages:
python -m venv user-fix-env
source user-fix-env/bin/activate
pip install selenium webdriver-manager click
When you’re done with the user account fixes, you can deactivate the virtual environment:
deactivate
Usage
Basic Command Structure
The script uses the following command structure:
python update_users.py --forgejo-base-url "https://forge.fedoraproject.org/"
Command-Line Options
-
--forgejo-base-url
: Base URL of the Forgejo instance (default:https://forge.fedoraproject.org/
)
How the Script Works
The script automates the manual process by:
-
Opening Firefox: Launches a Firefox browser window
-
Navigating to Login: Goes to the Forgejo login page
-
Manual Login Required: You must manually log in with your Fedora Accounts credentials (30-second timeout)
-
Accessing Admin Panel: Navigates to the admin users management page
-
Processing Users: For each user account:
-
Opens the user’s edit page in a new tab
-
Clicks the "Update user account" button
-
Waits for the success confirmation
-
Closes the tab and continues to the next user
-
-
Pagination Handling: Automatically handles multiple pages of users
Important Notes
-
Manual Login Required: The script will pause for 30 seconds to allow you to log in manually with your Fedora Accounts credentials
-
Administrator Access: Your Fedora Accounts user must be a member of the
sysadmin-forge
group -
Browser Window: Keep the Firefox window visible and don’t close it during execution
-
Processing Time: The script may take several minutes depending on the number of users
Verification
-
Confirm that affected users can now successfully log in to Fedora Forge.
-
Verify that user accounts are properly enabled and functional.
-
Test that users can access their repositories and perform normal operations.
Troubleshooting
If users continue to experience login issues after applying these workarounds:
-
Verify that the user account exists in the Fedora Forge user management system.
-
Check that the account has been properly activated.
-
Contact the Fedora Infrastructure team if the issue persists.
Want to help? Learn how to contribute to Fedora Docs ›