Browse Source

#1266 convert name to lower when handle SSH

Unknwon 6 years ago
parent
commit
647688bd06
3 changed files with 4 additions and 2 deletions
  1. 1 0
      README.md
  2. 1 0
      README_ZH.md
  3. 2 2
      cmd/serve.go

+ 1 - 0
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/)

+ 1 - 0
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)
 
 ### 云端部署

+ 2 - 2
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 {