From 647688bd0604b874c6ee877475b6da1217b2cdcd Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 9 Nov 2015 11:34:04 -0500 Subject: [PATCH] #1266 convert name to lower when handle SSH --- README.md | 1 + README_ZH.md | 1 + cmd/serve.go | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a8389038fb..567777b42c 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ There are 5 ways to install Gogs: - [How To Set Up Gogs on Ubuntu 14.04](https://www.digitalocean.com/community/tutorials/how-to-set-up-gogs-on-ubuntu-14-04) - [Run your own GitHub-like service with the help of Docker](http://blog.hypriot.com/post/run-your-own-github-like-service-with-docker/) +- [使用 Gogs 搭建自己的 Git 服务器](https://mynook.info/blog/post/host-your-own-git-server-using-gogs) (Chinese) - [阿里云上 Ubuntu 14.04 64 位安装 Gogs](http://my.oschina.net/luyao/blog/375654) (Chinese) - [Installing Gogs on FreeBSD](https://www.codejam.info/2015/03/installing-gogs-on-freebsd.html) - [Gogs on Raspberry Pi](http://blog.meinside.pe.kr/Gogs-on-Raspberry-Pi/) diff --git a/README_ZH.md b/README_ZH.md index 204ee5dbe9..a529b3ab75 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -57,6 +57,7 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自 ### 使用教程 +- [使用 Gogs 搭建自己的 Git 服务器](https://mynook.info/blog/post/host-your-own-git-server-using-gogs) - [阿里云上 Ubuntu 14.04 64 位安装 Gogs](http://my.oschina.net/luyao/blog/375654) ### 云端部署 diff --git a/cmd/serve.go b/cmd/serve.go index 5c527dffc8..fb90f6b448 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -144,8 +144,8 @@ func runServ(c *cli.Context) { if len(rr) != 2 { fail("Invalid repository path", "Invalid repository path: %v", args) } - repoUserName := rr[0] - repoName := strings.TrimSuffix(rr[1], ".git") + repoUserName := strings.ToLower(rr[0]) + repoName := strings.ToLower(strings.TrimSuffix(rr[1], ".git")) repoUser, err := models.GetUserByName(repoUserName) if err != nil {