+
Skip to content

Allow ssh:// prefix on ssh-clones #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ func main() {
getOrgs := flag.String("organizations", "all", "Which organizational repositories to fetch.\nValid values are 'public', 'private', 'none', or 'all'.")
getPersonal := flag.String("personal", "all", "Which personal repositories to fetch.\nValid values are 'public', 'private', 'none', or 'all'.")
http := flag.Bool("http", false, "Generate HTTP-based clones rather than SSH-based ones.")
ssh := flag.Bool("ssh", false, "Add 'ssh://'-prefix to the git clone command.")
output := flag.String("output", "", "Write output to the named file, instead of printing to STDOUT.")
prefix := flag.String("prefix", "", "The prefix beneath which to store the repositories upon the current system.")
token := flag.String("token", "", "The API token used to authenticate to the remote API-host.")
Expand Down Expand Up @@ -367,6 +368,18 @@ func main() {
clone = *repo.CloneURL
}

//
// Sometimes SSH clones need a prefix
//
if *ssh {
clone = "ssh://" + clone
}

//
// Hack!
//
clone = strings.ReplaceAll(clone, ":4444:", ":4444/")

//
// Should we exclude this entry?
//
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载