After coming home with Microsoft, more and more good and free things come to GitHub. This time, a long-awaited features are in beta, invitation-only, and it is
- 1. Extremely short introduction
- 2. Using GitHub codespaces
- 3. Some interesting things I found
Codespaces, in short, is a Linux virtual machine running
vscode server and allows you to access it via any web browser.
Microsoft introduces its codespaces first in Visual Studio Online, using your Azure account to charge. “GitHub codespaces” is in the early access stage, so everything is free for now.
To request early access to GitHub codespaces, here is the link: https://github.com/features/codespaces
When you’re invited to use codespaces, your GitHub’s repositories will have another option in open button
The default theme for VSCode is light. Light attracting bugs. So we need to change it to dark
The typical themes used by
vscode is not working, so we need to use an extension developed by GitHub called
Sadly, the icon theme is fixed with 1 of the two default set.
Except for some settings related to themes and icons that have no effect, almost all other settings are the same. You can just copy and paste the settings from your local
vscode to codespaces
I think every programming language extension worked as it should be, but first, you will need to set up the development environment in Linux.
For example, to use Java, you will need to install JDK on Linux, then Java Extension Pack for a complete list of Java extensions in vscode.
C/C++ and Python extensions are pre-installed
When you open a project, based on the language, some language extension will be pre-installed
By default, one codespace can only work with one repository. I will use the SSH key to have access to every repository on my Github.
- Generate SSH key
$ ssh-keygen -t rsa -b 4096 -C "firstname.lastname@example.org"
- Add ssh key to ssh agent
$ eval "$(ssh-agent -s)" > Agent pid xxxxx $ ssh-add ~/.ssh/id_rsa
- Add the public key to GitHub
Add the key to settings at SSH settings
- Change repo remote URL from HTTPS to SSH
git remote set-url origin email@example.com:<Username>/<Project>.git
- The codespaces running on Debian 9.13 -
- 4GB of RAM -
- Using 2 core of the Intel(R) Xeon(R) Platinum 8168 CPU @ 2.70GHz -
cat /proc/cpuinfo | grep processor | wc -l
vscode version is the latest Insider version, so expect some errors and unstable features