tenseleyflow/ndotfiles / d298d87

Browse files

switch to ssh

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
d298d873bcdd2dc5bd211cee2c6c32276a795a2f
Parents
7539069
Tree
d620ae2

1 changed file

StatusFile+-
M Script/sync-repos 4 3
Script/sync-reposmodified
@@ -85,9 +85,10 @@ sync_repo() {
8585
             ((total_skipped++)) || true
8686
         fi
8787
     else
88
-        # Clone new repo with timeout, showing progress
89
-        log_info "Cloning $repo..."
90
-        if timeout "$CLONE_TIMEOUT" gh repo clone "${github_org}/${repo}" "$repo_path" -- --progress 2>&1; then
88
+        # Clone new repo via SSH with timeout, showing progress
89
+        local ssh_url="git@github.com:${github_org}/${repo}.git"
90
+        log_info "Cloning $repo (SSH)..."
91
+        if timeout "$CLONE_TIMEOUT" git clone --progress "$ssh_url" "$repo_path" 2>&1; then
9192
             if [[ -d "$repo_path/.git" ]]; then
9293
                 log_success "$repo (cloned)"
9394
                 ((total_cloned++)) || true