As it's not yet listed in the question, nor in the previous answers, there's also Deveo that supports the requirements. There's a free tier we are launching for 5 users, after which the pricing is 36€/user/year.
- Relatively good web UI: source code and commit browsing are a must.
Deveo has one of the best UI/UX's there is
- Support for git and/or mercurial. Support for both is a plus.
Deveo supports both, in addition to Subversion (SVN)
- SSH shell (repositories must be accessible over ssh, instead of just http, even though at least git supports all operations over http relatively well)
Both SSH and HTTPS are supported.
- Permissions: at least
- private/public repositories
- read-only and full access
- Same permission set for web UI and for SSH (when granting/modifying permissions, it should be reflected to both)
- preferably integration to LDAP (both users and groups for permissions)
All of the above use cases are supported. In Deveo, repositories are grouped inside projects, which means you can have backend and frontend repositories in the same project. There's a fine-grained access control that can be utilized both at the project level and also on a repository level. The same permission scheme naturally applies to both repositories and Web UI. Deveo can be integrated to LDAP/AD and in addition, you can configure Deveo to authenticate against a SAML 2.0 based single sign-on service.
- Pull requests (aka. merge request)
Pull requests are supported at the moment within the same repository. You can set a number of approvals required before the changes can be merged, and even require a passing build for the branch before the merge can be conducted.
- Administration tools: creating repositories, granting access
Deveo supports multiple levels of access for creating repositories and granting access. The access control is role based which makes it simple to understand and use.
- Simple issue tracker: creating tickets, commenting, closing, tags/labels
Deveo has a built-in issue tracker that resembles Trello. You can create milestones, which act like trello boards, and drag&drop the issues from a state to another. There's possibility to comment on the issues, add attachments, assign people, label the issues and more.
- Preferably search, including tickets, users, projects, filenames and inside source code
You can search most of the content in Deveo.
- Preferably forking from web UI
Forking is supported from the UI.
- Preferably runs in Linux
All common Linux distributions are supported (Debian, CentOS, Ubuntu, RedHat)
I'm affiliated with Deveo