I use two computers for my coding projects and take only one computer while traveling. My projects require, however, that I run numerous tests that should run well even with my M1 computer, at the moment, not having all packages working smoothly together. To be more flexible and independent from a development environment, I use GitHub Codespaces. And I am very grateful to learn a new tool, which is so helpful that I do not know how I worked without it.
GitHub codespaces provide a development environment running in the cloud. A codespace environment is created with the help of configuration files added to a GitHub repository. To set up a codespace and build your app container, you will need to have the codespaces available in our organisation. You can create codespace environments for any branches in your GitHub repository when enabled. For that, press the “<> Code” green Button in your GitHub Web UI, and choose from default or advanced options.
GitHub CLI and Homebrew
To access Codespaces with SSH, we can install GitHub CLI with Homebrew Firstly, if Homebrew is not yet installed, Download Homebrew from https://brew.sh or by running the command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Next, install GitHub CLI.
brew install gh
Next, we can log in to the Codespaces with SSH. Personally, I use GitHub tokens to log in.
gh auth login
gh auth refresh -h github.com -s codespace
gh codespace ssh
To summarize, we have installed GitHub CLI on Mac and logged in to the GitHub Codespaces.
Did you like this post? Please let me know if you have any comments or suggestions.Posts about development tools and Python coding
Elena, a PhD in Computer Science, simplifies AI concepts and helps you use machine learning.