Failing to checkout from GitHub, with 'Could not read from remote repository'

I have recently switched a project to use CircleCI 2.0, from CircleCI 1.0, by replacing the circleci.yml with .circleci/config.yml. The configuration is based on work that I did for a new project, that successfully built.

The issue is that the build now fails with:

Cloning into '.'...
Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts.

ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Exited with code 128

I have since removed the ‘deploy key’ from the checkout section of the project and also checked that it was removed from the GitHub project. I then got CircleCI to regenerate one. This does not resolve the issue and I am not sure what I need to do to resolve the problem?

Note, that I did try ‘stopping’ the CircleCI project and recreating it, in the hopes that it would reset to some default, but instead it kept the old settings and state when I recreated.

In case it helps this is the first part of the config.yml file:

version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/node:7.10

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/mongo:3.4.4

    working_directory: ~/repo

    steps:
      - checkout
      - run:
          name: save SHA to a file
          command: echo $CIRCLE_SHA1 > .circle-sha
      - restore_cache:
          key: dependency-cache-{{ checksum "package.json" }}
      - run:
          name: Install dependencies via npm
          command: npm install
      - run:
          name: Run tests
          command: npm run test
      - run: scripts/build.sh
      - save_cache:
          key: dependency-cache-{{ checksum "package.json" }}
          paths:
            - node_modules
      - save_cache:
          key: v1-repo-{{ checksum ".circle-sha" }}
          paths:
            - ~/repo
2 Likes

any luck with it ?

My project was working well and at some point it just stopped… (same error)