Knowledge Base
Authentication is disabled (development mode).

Create a private fork of a public repository

Edit

enterprise fork git into private public repo repository

origin=https://...
fork=https://...

local=$(basename "$origin")
local=${local%.git}
git config --local --list | grep -q '^lfs.' && lfs=true || lfs=false

git clone --bare "$origin" "$local"
(
cd "$local"
$lfs && git lfs fetch --all
git push --mirror "$fork"
$lfs && git lfs push --all "$fork"
)
rm -rf "$local"
git clone "$fork" "$local"
cd "$local"
git remote add upstream "$origin"
git remote set-url --push upstream DISABLE

References:

docs.github.com
gist.github.com/0xjac
stackoverflow