danger / danger/danger

Travis CI Octokit::Unauthorized:

Open
#1,034 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
5.7k
Forks
488
PR merge metrics
No merged PRs in 30d

Description

# Report

## What did you do?

i followed the [getting start](https://danger.systems/guides/getting_started.html) step by step, everything setup well, but when i run `bundle exec danger pr`, the error just came out

i've set `DANGER_GITHUB_API_TOKEN ` with my bot account's token

## What did you expect to happen?

Running my Dangerfile without it crashing.

## What happened instead?
```
bundler: failed to load command: danger (/usr/local/bin/danger) │
Octokit::Unauthorized: GET https://api.github.com/repos/me/myProject/pulls/3: 401 - Bad creden│
tials // See: https://developer.github.com/v3 │
/usr/local/lib/ruby/gems/2.5.0/gems/octokit-4.13.0/lib/octokit/response/raise_error.rb:16:in `on_compl│
ete' │
/usr/local/lib/ruby/gems/2.5.0/gems/faraday-0.15.3/lib/faraday/response.rb:9:in `block in call' │
/usr/local/lib/ruby/gems/2.5.0/gems/faraday-0.15.3/lib/faraday/response.rb:61:in `on_complete' │
/usr/local/lib/ruby/gems/2.5.0/gems/faraday-0.15.3/lib/faraday/response.rb:8:in `call' │
/usr/local/lib/ruby/gems/2.5.0/gems/faraday-http-cache-1.3.1/lib/faraday/http_cache.rb:303:in `fetch' │
/usr/local/lib/ruby/gems/2.5.0/gems/faraday-http-cache-1.3.1/lib/faraday/http_cache.rb:208:in `process│
' │
/usr/local/lib/ruby/gems/2.5.0/gems/faraday-http-cache-1.3.1/lib/faraday/http_cache.rb:146:in `call!' │
/usr/local/lib/ruby/gems/2.5.0/gems/faraday-http-cache-1.3.1/lib/faraday/http_cache.rb:119:in `call' │
/usr/local/lib/ruby/gems/2.5.0/gems/faraday-0.15.3/lib/faraday/rack_builder.rb:143:in `build_response'│
/usr/local/lib/ruby/gems/2.5.0/gems/faraday-0.15.3/lib/faraday/connection.rb:387:in `run_request' │
/usr/local/lib/ruby/gems/2.5.0/gems/faraday-0.15.3/lib/faraday/connection.rb:138:in `get' │
/usr/local/lib/ruby/gems/2.5.0/gems/sawyer-0.8.1/lib/sawyer/agent.rb:94:in `call' │
/usr/local/lib/ruby/gems/2.5.0/gems/octokit-4.13.0/lib/octokit/connection.rb:156:in `request' │
/usr/local/lib/ruby/gems/2.5.0/gems/octokit-4.13.0/lib/octokit/connection.rb:19:in `get' │
/usr/local/lib/ruby/gems/2.5.0/gems/octokit-4.13.0/lib/octokit/client/pull_requests.rb:33:in `pull_req│
uest' │
/usr/local/lib/ruby/gems/2.5.0/gems/danger-5.8.0/lib/danger/request_sources/github/github.rb:117:in `f│
etch_details' │
/usr/local/lib/ruby/gems/2.5.0/gems/danger-5.8.0/lib/danger/commands/local_helpers/local_setup.rb:32:i│
n `setup' │
/usr/local/lib/ruby/gems/2.5.0/gems/danger-5.8.0/lib/danger/commands/pr.rb:60:in `run'
```

## Your Environment

* Which CI are you running on? Travis CI
* Are you running the latest version of Danger? yes
* What is your Dangerfile?

```
# Sometimes it's a README fix, or something like that - which isn't relevant for
# including in a project's CHANGELOG for example
declared_trivial = github.pr_title.include? "#trivial"

# Make it more obvious that a PR is a work in progress and shouldn't be merged yet
warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]"

# Warn when there is a big PR
warn("Big PR") if git.lines_of_code > 500

# Don't let testing shortcuts get into master by accident
fail("fdescribe left in tests") if `grep -r fdescribe specs/ `.length > 1
fail("fit left in tests") if `grep -r fit specs/ `.length > 1

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.