SSH
SSH connection hangs for 60 seconds
SSH connection hangs for 60 seconds
Possible cause: Gogs makes an HTTP request back to its own web service after every SSH push. If the server firewall or ISP blocks this loopback connection, the request will hang until it times out.Solution: Ensure that the server can reach itself on the configured HTTP port. Check firewall rules and any network policies that may prevent loopback connections.
Incorrect binary path for update hook
Incorrect binary path for update hook
Possible cause: You moved the Gogs binary to a different location from where it was originally installed, so the Git hooks reference a stale path.Solution: Go to the Admin Panel (
/admin) and run these two tasks:- Rewrite
.ssh/authorized_keysfile - Resync pre-receive, update and post-receive hooks of all repositories
Push succeeds but the dashboard timeline does not update
Push succeeds but the dashboard timeline does not update
Possible cause: When using Git over SSH, Gogs relies on hook scripts to update the timeline and repository display. Several conditions can prevent these scripts from executing, especially when repositories are stored on a mounted device.Solution:
- Ensure the mount point containing the repositories is not set as
noexec. Runmountto check, and if necessary add theexecoption to the mount point in/etc/fstab. - For
vfat(and possiblycifs) mounts, ensure theuid,gid, andfmaskoptions permit the Gogs user (or a group it belongs to) to execute files. - For network-mounted shares (NFS, Samba), ensure the server is not configured to disallow execution on the remote filesystem.
Git
Public key conflict: 'does not appear to be a git repository'
Public key conflict: 'does not appear to be a git repository'
Error:Or: pushed commits but the repository still shows as bare.Possible cause: There are duplicate SSH keys in
~/.ssh/authorized_keys. This commonly happens if you are (or were) running GitLab on the same system user.Solution: Edit ~/.ssh/authorized_keys and remove the old duplicate entry, keeping only the key that was added by Gogs.Cannot call 'git' command by Gogs
Cannot call 'git' command by Gogs
Error:Possible cause: On Windows, this occurs when Git Bash was installed without enabling the
cmd option, so git is not available on the system PATH.Solution: Reinstall Git for Windows and make sure the option to add Git to the system PATH (the cmd option) is enabled.Database
Incorrect MySQL storage engine (key too long)
Incorrect MySQL storage engine (key too long)
Error:Possible cause: The database is using the MyISAM storage engine, which has a shorter maximum key length than InnoDB.Solution: After importing the initial schema, log into MySQL and switch the storage engine:Then re-run the Gogs installer at
http://localhost:3000/install.Outdated MySQL password authentication
Outdated MySQL password authentication
Error:Possible cause: The MySQL user’s password was only updated for the
@localhost entry. A second entry in the user table (such as @%) still has the old-format password.Solution: Update the password for all host entries of the MySQL user. See this GitHub discussion for detailed steps.Wrong SQLite3 database file
Wrong SQLite3 database file
Error: Pushing to a repository shows that the owner is not registered, or the
user table does not exist.Possible cause: Gogs may be running as a system service and loading a different SQLite3 file than expected (for example, a relative path resolved differently).Solution: Use an absolute path for the SQLite3 database file in your custom/conf/app.ini configuration.Gmail error 534: 'Please log in via your web browser'
Gmail error 534: 'Please log in via your web browser'
Possible cause: Google does not trust the server sending the email and requires additional verification.Solution:
- Visit https://accounts.google.com and log in.
- Go to https://accounts.google.com/DisplayUnlockCaptcha and click Continue.
- Copy the
ContinueSignInlink from the Gogs server log and complete the sign-in. - Check your spam folder in case your mail provider flagged the messages.
Authentication failed (error 535)
Authentication failed (error 535)
Error:Possible cause: The SMTP password contains special characters that are not being interpreted correctly.Solution: Wrap the password in single quotes in your
custom/conf/app.ini:Windows
Cygwin path conflict
Cygwin path conflict
Error:Possible cause: Another shell (such as Cygwin) is installed on the system and its path style conflicts with the native Windows paths Gogs expects.Solution: Start Gogs using the default Windows Command Prompt (
cmd.exe) instead of Cygwin or other alternative shells.CSS loaded with wrong MIME type
CSS loaded with wrong MIME type
Error:Possible cause: The Windows registry has an incorrect
Content Type value for the .css file extension.Solution: Open the Windows Registry Editor, navigate to HKEY_CLASSES_ROOT\.css, and change the Content Type value to text/css.Other
Extremely slow page response despite low reported render time
Extremely slow page response despite low reported render time
Possible cause: This can happen for two reasons:
- Nginx is trying to resolve
localhostas an IPv6 address, causing a delay. - Gravatar avatar lookups are being attempted without a valid email address.
- Use the explicit hostname
127.0.0.1instead oflocalhostduring the initial setup athttp://gogs-server:3000/install. - Either use a valid Gravatar email address for the administrator account or disable avatar lookup during the initial setup.
Duplicate entry for SSH key name
Duplicate entry for SSH key name
Error:Possible cause: A very early version of Gogs had a unique constraint (
UQE_public_key_name) on SSH key names in the public_key table. This constraint is no longer needed.Solution: Manually delete the UQE_public_key_name unique index from the public_key table in your database.GLIBC_2.14 not found
GLIBC_2.14 not found
Solution: Update the C library on your system:
Permission denied when creating session data directory
Permission denied when creating session data directory
Error:Possible cause: Gogs creates a
data subdirectory in the same directory as the Gogs binary. The process does not have write permission to that directory.Solution: Ensure the user running Gogs has permission to create subdirectories in the directory where the Gogs binary is located.remote rejected: hook declined
remote rejected: hook declined
Error:Possible cause: Git is unable to execute the update hook script.Solution: Make sure the
bash shell is available on your system. All Gogs hook scripts require bash to run.