Migrating from GitHub to AWS CodeCommit
while read r; do | |
echo $r | |
aws codecommit delete-repository --repository-name $r --region us-east-1 | |
done < ~/dev/utility-scripts/aws/codecommit/repos.txt |
while read r; do | |
echo $r | |
curl -X DELETE -u $GITHUB_USER:$GITHUB_PASSWD https://api.github.com/repos/$GITHUB_ORG/$r | |
done < ~/dev/utility-scripts/aws/codecommit/repos.txt |
curl --silent -u $GITHUB_USER:$GITHUB_PASSWD https://api.github.com/orgs/$GITHUB_ORG/repos?per_page=100 -q | grep "\"name\"" | awk -F': "' '{print $2}' | sed -e 's/",//g' >> ~/dev/utility-scripts/aws/codecommit/repos.txt |
cd ~/_trash | |
while read r; do | |
echo $r | |
aws codecommit create-repository --repository-name $r --region us-east-1 | |
git clone --mirror git@github.com:$GITHUB_ORG/$r.git | |
cd $r.git | |
git push ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/$r --all | |
git push ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/$r --tags | |
sleep 10 | |
aws codecommit update-default-branch --repository-name $r --default-branch-name master --region us-east-1 | |
cd .. | |
done < ~/dev/utility-scripts/aws/codecommit/repos.txt |
This comment has been minimized.
This comment has been minimized.
sir, you are a godsend |
This comment has been minimized.
This comment has been minimized.
It works smoothless, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
See http://www.paul-kearney.com/2015/09/migrating-from-github-to-aws-codecommit.html for more information.