Page MenuHomePhabricator
Paste P8871

git fetch over anon HTTPS, git push over SSH
ActivePublic

Authored by CDanis on Aug 6 2019, 2:06 PM.
✔️ cdanis@evebox ~/work/gits/puppet 🕙☕ tail -n8 ~/.gitconfig
[url "https://gerrit.wikimedia.org/r/"]
insteadOf = ssh://cdanis@gerrit.wikimedia.org:29418/
[url "ssh://cdanis@gerrit.wikimedia.org:29418/"]
pushInsteadOf = https://gerrit.wikimedia.org/r/
# This looks mysterious, but is what stops a cloned-via-SSH repo
# from being rewritten to HTTPS for push.
[url "ssh://cdanis@gerrit.wikimedia.org:29418/"]
pushInsteadOf = ssh://cdanis@gerrit.wikimedia.org:29418/
✔️ cdanis@evebox ~/work/gits/puppet 🕙☕ git remote get-url origin
https://gerrit.wikimedia.org/r/operations/puppet
✔️ cdanis@evebox ~/work/gits/puppet 🕙☕ git remote get-url origin --push
ssh://cdanis@gerrit.wikimedia.org:29418/operations/puppet

Event Timeline

CDanis created this paste.Aug 6 2019, 2:06 PM
CDanis changed the title of this paste from untitled to git fetch over anon HTTPS, git push over SSH.