2 # Set up interactive development environment in a https://quay.io/repository/cockpit/tasks container
3 # Start the container on e2e with:
4 # docker network create --driver bridge pitti
5 # docker run --name pitti -d --volume=/var/cache/cockpit-tasks/images:/cache/images:rw --shm-size=1024m -e NPM_REGISTRY=https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/ --network=pitti quay.io/cockpit/tasks sleep infinity
6 # docker exec -it pitti byobu
12 cat <<EOF > ~/.ssh/config
18 StrictHostKeyChecking no
19 UserKnownHostsFile /dev/null
20 IdentityFile ~/upstream/bots/machine/identity
24 read -p "Enter github.com user name (empty to skip authenticated github setup): " github_user
25 if [ -n "$github_user" ]; then
26 read -p "Enter github.com token (empty to skip authenticated github setup): " github_token
27 if [ -n "$github_token" ]; then
28 printf '[credential]\n\thelper = store\n' >> ~/.gitconfig
29 printf "https://${github_user}:${github_token}@github.com" > ~/.git-credentials
30 chmod 600 ~/.git-credentials
34 # cockpit development git repos
35 mkdir -p ~/.cache ~/upstream
36 ln -sfn /cache/images ~/.cache/cockpit
38 git clone https://github.com/cockpit-project/bots
40 [ -z "$github_user" ] || git remote add my https://github.com/$github_user/bots
42 git clone https://github.com/cockpit-project/cockpit
44 [ -z "$github_user" ] || git remote add my https://github.com/$github_user/cockpit
48 if [ -n "$github_token" ]; then
50 printf "hosts:\n github.com:\n oauth_token: ${github_token}\n user: ${github_user}\n" > ~/.config/gh/config.yml