0.11.34.1122中创建新项目错误以及推送错误。


#1

请先搜索确保没有重复发帖。

Gogs 版本:0.11.34.1122
系统类型及版本:OpenBSD 6.2
数据库:SQLite3
问题描述:

创建新项目时,如果选择“使用选定的文件和模板初始化仓库”选项,则无法创建项目,出现下面的提示:

[Macaron] 2018-01-05 14:40:43: Started POST /repo/create for 10.0.1.7
[git-module] /app/gitserver/repositories/user/client.git: git init --bare
2018/01/05 14:40:43 [TRACE] Session ID: c170a1478105103f
2018/01/05 14:40:43 [TRACE] CSRF Token: jMVEfQth_ggbthjQUCvpAfHD9WA6MTUxNTEzMjYyOTMxMDQwMTgxOA==
[git-module] stdout:
Initialized empty Git repository in /app/gitserver/repositories/user/client.git/

2018/01/05 14:40:44 [ERROR] [.../routes/repo/repo.go:102 handleCreateError()] CreatePost: initRepository: initRepoCommit: git push: remote: env: bash: No such file or directory        
To /app/gitserver/repositories/user/client.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '/app/gitserver/repositories/user/client.git'

2018/01/05 14:40:44 [TRACE] Template: status/500
[Macaron] 2018-01-05 14:40:44: Completed POST /repo/create 500 Internal Server Error in 711.712572ms

如果不选择“使用选定的文件和模板初始化仓库”,可以创建新项目,但是无法push代码到项目中去。错误信息:

[Macaron] 2018-01-05 14:49:39: Started GET /user/client.git/info/refs?service=git-receive-pack for 10.0.1.7
[Macaron] 2018-01-05 14:49:39: Completed GET  /user/client.git/info/refs?service=git-receive-pack 401 Unauthorized in 6.119074ms

0.11.4.0405 中创建新项目错误以及推送失败。
#2

问题找到了。