# No Git remote

**URL:** <https://discuss.circleci.com/t/no-git-remote/14942>\
**Category:** Build Environment\
**Tags:** github, git\
**Created:** [July 31, 2017, 8:21am UTC](https://discuss.circleci.com/t/no-git-remote/14942 "2017-07-31T08:21:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kpa](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/kpa/32/15110_2.png) [@kpa](https://discuss.circleci.com/u/kpa)\
**Post date:** [July 31, 2017, 8:21am UTC](https://discuss.circleci.com/t/no-git-remote/14942/1 "2017-07-31T08:21:38Z")

</div>

We’re using Danger to automate parts of code review. For a while it’s been reporting this error:

```auto
bundle exec danger

Could not set up API to Code Review site for Danger

For your GitHub repo, you need to expose: DANGER_GITHUB_API_TOKEN
You may also need: DANGER_GITHUB_HOST, DANGER_GITHUB_API_BASE_URL

Found these keys in your ENV: CIRCLE_BUILD_NUM, DANGER_GITHUB_API_TOKEN, ...

```

On closer inspection turned out to be generic. As can be clearly seen from the logs the required token is in the environment. What really happens is that Danger can’t find a [git remote](https://github.com/danger/danger/blob/676a8a5db34dcb8cde7da1ec7326ca7f4b208516/lib/danger/scm_source/git_repo.rb#L62), which it uses to [validate a working CI](https://github.com/danger/danger/blob/676a8a5db34dcb8cde7da1ec7326ca7f4b208516/lib/danger/request_sources/request_source.rb#L40).

I ssh’ed into a machine and tried running the same command and the list of remotes came up empty. Is this to be expected? Building without cache works as expected.

As a workaround I’ve added `git remote add origin <repo.git>` to `circle.yml`'s `checkout.post`, but it’d be great if that just worked automatically.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:39am UTC](https://discuss.circleci.com/t/no-git-remote/14942/2 "2018-06-18T11:39:45Z")

</div>

Closed on June 18, 2018, 11:39am UTC


