This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io" | |
"log" | |
"os" | |
) | |
var target_path string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
#-- Script to automatically convert all git remotes to HTTPS from SSH for gitlab repos | |
# Script will change all the git remotes. | |
# If you didn't intend to do that, run the other script in this repo. | |
# Original 1: https://gist.github.com/m14t/3056747 | |
# Original 2: https://gist.github.com/chuckbjones/9dc6634fe52e56ba45ac | |
# Thanks to @m14t, @michaelsilver and @chuckbjones. | |
ssh_to_https(){ | |
REPO_URL=`git remote -v | grep -m1 "^$1" | sed -Ene's#.*(git@gitlab.com:[^[:space:]]*).*#\1#p'` |