Gitpod, my new on-demand 🛎 dev environment 👨💻
Thursday, March 7, 2019
4 min read
I am writing this post from a Gitpod environment, launched directly from my blog’s repository URL.
You can try this just now: https://gitpod.io/#https://github.com/doppelganger9/blog
Did you see how easy and smart it is to just add
https://gitpod.io/# in front of your GitHub repo to launch the environment 🤓?
Ok, time to make it trippy:
What is this?
As you see, the idea is to have a VisualStudio Code in the browser development environment bootstrapped from your repository.
To be more precise, it is based on Theia IDE
It does not come with your collection of VSCode Extensions, but it is enough useful for 95% of the time.
It has a few disconnecting moments.
exposing a local web server
It can expose ports like when you need to run your dev web server, it is possible and really frictionless.
Whoops, If like me you are used to hitting
CMD + W on VSCode to close files, this will not work here, because it will close the browser tab! 😱 Hopefully, opening back https://gitpod.io shows my workspaces and the one I accidentally closed is still running and I can reopen it in the state it was (process running, etc.) which is well thought!
Don’t forget to stop your workspaces, the free tier gives you 100 Hours which is really sufficient for my kind of usage: working on Github Repositories outside of working hours.
This integration test is failing 🤭
After I finished writing the first draft of this post, I tried to
git push, but I encountered this error:
! [remote rejected] ... (refusing to allow an integration to create .github/main.workflow)
GitHub rejects my push because it seems that when you enable Github Actions it blocks all other GitHub Integrations from working. And Gitpod is one such Integration.
Well… again not everything is 🌈 and 🦄.
Damn, after a little search, it seems there really is an issue about this.
Oh once you enable @GitHub Actions on a repo no other integration will work. For example trying to push a git tag using a deploy key will error out with: "refusing to allow an integration to create .github/main.workflow"— Stefan Prodan (@stefanprodan) 28 janvier 2019
Yes, it's a bug, and we're working on a fix. There are security reasons not to let integrations write to main.workflow, but our current version of this check may be too restrictive. Thanks for the report.— Patrick Reynolds (@p_reynolds) 28 janvier 2019
Partial fix and git-fu 🥋
I could not resolve myself to neither remove Github Actions nor drop using Gitpod!
git stash-ed my uncommitted changes,
git checkout -to leave the git branch I had dedicated for this post and come back to the previous one (
git checkout masteralso works, but 5 more characters to type? Meh.)
git cherry-pick-ed the commits I did, not knowing the
git pushworked 🎉 from
master, so I knew I would not have to copy all my changes out of Gitpod to my local computer,
git stash pop-ped and proceeded from here to continue writing this paragraph and push it live!
So, as I’ve experienced sort of an emotional rollercoaster, at a moment I thought that even though I really liked the idea of having a “remote VS Code in the browser” and in the past had found it very useful, combining this with Github Actions had ruined it. But pushing from
master did the trick!
I hope you learned a few things or at least witnessed how I bump against issues and go on 🤣.
Thanks for reading this blog, If you have any questions, please use the Github Repository’s Issues to start a conversation.