Windows Boy in a Mac World

By | August 8, 2019

How to configure VScode, Github, & A Cloud Drive across Windows 10 and OS X

I just recently got a Macbook Pro from my office. They said I was due for a system refresh & the 2 systems I’ve been using have been sufficient for my needs. So after *years* of wanting one but not really having the justification to get one, I’m now in the position where I have 3 systems:

  1. My home Windows workstation (which is where I do the majority of my work)
  2. My travel Windows laptop (which I’ve had for 3 years but is still great on the road).
  3. The new Macbook Pro (which needs to be setup to look like both 1 & 2)
I may have a problem…

Needless to say this has been a learning experience on my part. Having about 1-2% Mac OS experience compelled me to write this article to help future Chris when he’s trying to configure multiple systems using multiple OSes.

The Process

I’m a big fan of Chocolatey, so when I first got the system, I installed Brew & added the same packages (minus the Windows-specific stuff) that I had on my Windows boxes. So far so good! p.s. here’s my choco stuffs:

choco upgrade awscli git keepass nano nodejs notepadplusplus openssh python3 vscode 7zip adobereader dropbox googlechrome googledrive setpoint unifying microsoft-teams terraform firefox putty.install rvtools slack spotify winscp zoom -y 

Up next was configuring git on the Mac. Also no issue!

Then came the problems…

Issue #1: Git Line Endings

You’ll note that I use Google Drive to sync a folder across all my systems. I’ve been doing this for years & have my local git repos in there as well. When all of your systems are of one OS flavor this isn’t an issue… Windows and OS X treat line endings differently so if you create a file in one OS to a cloud drive, then try to access said file in another OS, you’ll see that *ALL* files are treated as Modified & need to be committed.

The Fix

From your Windows command line type in the following command:

git config --global core.autocrlf true

From your OS X terminal type in the following command:

git config --global core.autocrlf input

(If you want to learn the why of this, click here)

Issue #2: 2 Factor Authentication

I have 2FA turned on for my Github account (and YOU SHOULD TOO). For some reason VScode authentication to github doesn’t like this (you don’t get prompted for the 2FA code)… this is a known issue if you are running VScode on Mac.

The Fix

Create a personal access token on the github site and use the token as your password from your Mac.

Several folks have told me that I *must* install package X or play with module Y… as I progress I’ll be writing more articles from this brave new world called OS X…

We’re not on Earth C-137 anymore…