Authentication failed for gem installation

Viewed 483

bundle install leads to error:

Fetching https://x-oauth-basic@github.com/MyCompanny/fiscal_calendar.git
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/MyCompanny/fiscal_calendar.git/'
Retrying `git clone 'https://x-oauth-basic@github.com/MyCompanny/fiscal_calendar.git' 

it will eventually fails, although in the Gemfile:

pat = "OUR PERSONAL TOKEN HERE"
gem 'fiscal_calendar', '~> 0.1.2', git: "https://#{pat}:x-oauth-basic@github.com/MyCompanny/fiscal_calendar.git"

We are sure that our personal token is valid, however, we still get the error Invalid username or password.

Although in the log, it says:

git clone 'https://x-oauth-basic@github.com/MyCompanny/fiscal_calendar.git'

so, it seems not using the personal token?

Any idea?

1 Answers

After investigation, the Github personal token was found expired. It seems my testing against token expiry was not working, as the gems was actually cached.

Related