Gogs is a painless self-hosted Git service
 
 
 
 
Go to file
Sergey Dryabzhinsky 303fa37b60 repo: support avatars (#5221)
* First code for repository avatars

* Last code for repository avatars

- add new option for repo avatars location on filesystem
- add route catch in web
- add new fields to repo model
- add migration
- update settings handlers
- update repo header template

* Update locale messages

* Add repo avatars to home page

* Add repo avatars to organization right panel

* Show repo avatars in repo list

* Remove AvatarEamil field, remove Gravatar support, use generic locale messages

* Fix migration

* Fix seed and not used tool

* Revert public css changes, add them to less files

* Latest lessc (2.6.0) don't put result into file but output to stdout

So redirect output to file

* Simplify things:

- migration don't needed, and table changes too
- just upload file to repo avatar storage
- or generate random image

* Fix repo image seed - name not unique

* Get rid of not needed model fields

* Class value is enough, remove height attribute

* Don't generate random avatar for repository

- use html and semantic ui icons if no avatar found

* Update styles and templates for repo

- use repo icon as default avatar
- use globe icon for public repos
- add micro style for repo avatars at dashboard

* Remvoe redundant empty line

* Fix nl2br filter - must return string

* Fix css style for micro-repo-avatar in dashboard list

* Remove `|len`, works fine w/o it.

* Update after review 2:

- use static route for repository avatar
- format images settings block in settings

* Update after review 2:

- no random avatar for repo

* Update after review 2:

- no random avatar for repo 2
- update imports
- update UploadAvatar* functions

* Update after review 2:

- update templates

* Fix trace call

* Remove unused immport since we use static route for repo avatars.
2018-06-17 20:21:52 +08:00
.github .github: update link to ISSUE_TEMPLATE.md (#5193) 2018-04-25 18:28:41 -04:00
cmd repo: support avatars (#5221) 2018-06-17 20:21:52 +08:00
conf repo: support avatars (#5221) 2018-06-17 20:21:52 +08:00
docker docker: rename "gogits" to "gogs" 2018-05-27 09:29:34 +08:00
models repo: support avatars (#5221) 2018-06-17 20:21:52 +08:00
packager packager: update files (#4181) 2017-02-23 15:33:58 -05:00
pkg repo: support avatars (#5221) 2018-06-17 20:21:52 +08:00
public repo: support avatars (#5221) 2018-06-17 20:21:52 +08:00
routes repo: support avatars (#5221) 2018-06-17 20:21:52 +08:00
scripts models: add ROW_FORMAT=DYNAMIC when creating table for supports mysql 5.6 (#4913) 2018-03-09 15:44:07 -05:00
templates repo: support avatars (#5221) 2018-06-17 20:21:52 +08:00
vendor vendor: update gopkg.in/ini.v1 2018-06-17 09:08:21 +08:00
.bra.toml Makefile: correct errors 2017-07-14 16:48:55 -04:00
.codebeatignore Add .mailmap 2016-08-11 16:57:48 -07:00
.codebeatsettings Adjust .codebeatsettings 2016-08-08 23:26:10 -07:00
.dockerignore docker: use vendor to replace go get 2017-03-27 14:04:48 -04:00
.editorconfig milestone: only show issue-related count under issue list (#4316) 2017-03-24 14:00:01 -04:00
.gitattributes locale: sync from Crowdin 2018-04-25 13:50:48 -04:00
.gitignore webhook: minor text change on Discord 2017-02-19 16:07:28 -05:00
.mailmap Add .mailmap 2016-08-11 16:57:48 -07:00
.pkgr.yml pkgr: update spec to build on Debian 9 (Stretch) (#5083) 2018-03-08 02:14:18 -05:00
.travis.yml ci: remove Go 1.6.x 2018-06-09 17:43:26 +08:00
Dockerfile docker: allow setting UID and GID when running a container (#4776) 2017-10-13 16:26:39 -04:00
Dockerfile.aarch64 docker: allow setting UID and GID when running a container (#4776) 2017-10-13 16:26:39 -04:00
Dockerfile.aarch64hub docker: enable Automated builds for aarch64 ( ARM64 ) platforms (#5058) 2018-03-09 13:05:33 -05:00
Dockerfile.rpi docker: allow setting UID and GID when running a container (#4776) 2017-10-13 16:26:39 -04:00
Dockerfile.rpihub docker: allow setting UID and GID when running a container (#4776) 2017-10-13 16:26:39 -04:00
LICENSE Change LICENSE copyright holder name [CI SKIP] 2016-08-09 13:05:15 -07:00
Makefile repo: support avatars (#5221) 2018-06-17 20:21:52 +08:00
README.md vendor: rename "gogits" to "gogs" 2018-05-27 09:07:15 +08:00
README_ZH.md vendor: rename "gogits" to "gogs" 2018-05-27 09:07:15 +08:00
appveyor.yml Update CI settings 2017-02-09 20:11:34 -05:00
gogs.go pkg/setting: ignore config inline comment by default 2018-06-17 09:10:18 +08:00

README.md

Gogs Build Status Build status Crowdin Discord

Current tip version: .VERSION (see Releases for binary versions)
Web UI Preview
Dashboard Repository Editor
Profile Diff Repository Settings
Webhook Organization Admin Dashboard

Important Notes

  1. YOU MUST READ Contributing Code BEFORE STARTING TO WORK ON A PULL REQUEST.
  2. Due to testing purpose, data of try.gogs.io was reset in Jan 28, 2015 and will reset multiple times after. Please do NOT put your important data on the site.
  3. The demo site try.gogs.io is running under develop branch.
  4. If you think there are vulnerabilities in the project, please talk privately to u@gogs.io, and the name you want to be credited as. Thanks!
  5. If you're interested in using APIs, we have experimental support with documentation.
  6. If your team/company is using Gogs and would like to put your logo on our website, contact us by any means.

简体中文

Purpose

The goal of this project is to make the easiest, fastest, and most painless way of setting up a self-hosted Git service. With Go, this can be done with an independent binary distribution across ALL platforms that Go supports, including Linux, macOS, Windows and ARM.

Overview

Features

  • Activity timeline
  • SSH and HTTP/HTTPS protocols
  • SMTP/LDAP/Reverse proxy authentication
  • Reverse proxy with sub-path
  • Account/Organization/Repository management
  • Add/Remove repository collaborators
  • Repository/Organization webhooks (including Slack and Discord)
  • Repository Git hooks/deploy keys
  • Repository issues, pull requests, wiki and protected branches
  • Migrate and mirror repository and its wiki
  • Web editor for repository files and wiki
  • Jupyter Notebook
  • Two-factor authentication
  • Gravatar and Federated avatar with custom source
  • Mail service
  • Administration panel
  • Supports MySQL, PostgreSQL, SQLite3, MSSQL and TiDB (via MySQL protocol)
  • Multi-language support (29 languages)

Hardware Requirements

  • A Raspberry Pi or $5 Digital Ocean Droplet is more than enough to get you started. Some even use 64MB RAM Docker CaaS.
  • 2 CPU cores and 512MB RAM would be the baseline for teamwork.
  • Increase CPU cores when your team size gets significantly larger, memory footprint remains low.

Browser Support

  • Please see Semantic UI for specific versions of supported browsers.
  • The smallest resolution officially supported is 1024*768, however the UI may still look right in smaller resolutions, but no promises or fixes.

Installation

Make sure you install the prerequisites first.

There are 5 ways to install Gogs:

Tutorials

Screencasts

Deploy to Cloud

Software and Service Support

Product Support

Acknowledgments

  • Thanks Egon Elbre for designing logo.
  • Thanks Crowdin for sponsoring open source translation plan.
  • Thanks DigitalOcean for sponsoring VPS service.
  • Thanks KeyCDN for sponsoring CDN service.

Contributors

License

This project is under the MIT License. See the LICENSE file for the full license text.