Lindenii Project Forge
Commit info | |
---|---|
ID | 37aed1b98fb95d4dbbeb95b2ec487186fd04f404 |
Author | Runxi Yu<me@runxiyu.org> |
Author date | Wed, 12 Feb 2025 20:05:54 +0800 |
Committer | Runxi Yu<me@runxiyu.org> |
Committer date | Wed, 12 Feb 2025 20:05:54 +0800 |
Actions | Get patch |
repo_info: Warning to http cloners
package main import ( "net/http" "net/url" ) func handle_repo_info(w http.ResponseWriter, r *http.Request, params map[string]string) { http.Error(w, "\x1b[1;93mHi! We do not support Git operations over HTTP yet.\x1b[0m\n\x1b[1;93mMeanwhile, please use ssh by simply replacing the scheme with \"ssh://\":\x1b[0m\n\x1b[1;93mssh://" + r.Host + "/" + url.PathEscape(params["group_name"]) + "/:/repos/" + url.PathEscape(params["repo_name"]) + "\x1b[0m", http.StatusNotImplemented) }