How to change default author and committer?


#1

I pushed to a gogs repo without setting my username in git config

[git-module] /home/centos/gogs-repositories/admin0/123.git: git cat-file commit     a1b231d68b7df2fd706a11b4203aaa9a63feaf0a
    [git-module] stdout:
    tree f93e3a1a1525fb5b91020da86e44810c87a2d7bc
    author Gogs <gogs@fake.local> 1523588635 +0530
    committer Gogs <gogs@fake.local> 1523588635 +0530

    first commit

I want that “Gogs” to be “Jake” as default


#2

@Unknwon https://github.com/gogits/gogs/blob/63a263f542716cf3663743d470df9b1f1eceb52e/models/repo.go#L119

for configKey, defaultValue := range map[string]string{"user.name": "Jake", "user.email": "jake@fake.local"} {

I have found the line, and changed it as above, but this file doesn’t get built using the makefile. How can I make sure the edit takes place during the make build?


#3

Gogs does so just to prevent you never setup default author, you MUST have a author to commit anything. Once you setup your own author, Gogs skips the fake user. That is a warning rather than a feature.