Thursday 5 December 2019

Golang and private gitlab repos and 410 Gone

I've been following a microservices with golang tutorial recently, and needed to refer to one project from another.

After getting numerous errors with `go get` and much searching for answers, I stumbled across this solution.

In Gitlab add a personal access token.

In your ~/.netrc file add:

machine gitlab.com
  login {{personal_access_token_name}}
  password {{personal_access_token}}


Replacing the prompts with the actual values.

In your .bashrc add

export GOPRIVATE="gitlab.com/{{path_to_project}}"


This is working for me, a similar approach may well work with bitbucket or codebasehq.

Sunday 3 March 2019

OSX and image not found readline.bundle

Something changed recently in my osx configuration, I'm not sure what, but it broke readline on the macbook.

The key part of the error message  was:

Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib (LoadError)
  Referenced from: /Users/stokern/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin17/readline.bundle
  Reason: image not found - /Users/stokern/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin17/readline.bundle


The fix was to add the ruby readline gem:

group :development, :test do
  ...
  gem 'rb-readline'
end

This is the second time this has caught me out, so I thought I'd document it.

You're welcome