Switch to new repository

Site name is a custom domain https://www.mgocpa.com we would like to switch this to a new GitLab repository. What are the steps and would the site go down during the switch? How do we go about connecting the new GitLab repo to the site? Thank you.

Hi @tdorff

Under Site settings > Build & deploy there is a dropdown (in the Repository section) to Manage repository. You’ll find the option to link to a new repository here.

You’ll also find information in the Change linked Git repository section of the Repository permissions and linking documentation

Thanks. If I unlink and then link the new one would that make the site go down while it’s deploying? Or would it be okay to unlink after everything is working on the new repo?

No, the repository doesn’t impact the site that is already deployed.

Thanks for the confirmation. I did test a switch on staging and the site is not showing up, just says site can’t be reached. URL is https://mgo-stage.netlify.app/

I got this build error:
Command failed with exit code 1: CI= yarn generate (https://ntl.fyi/exit-code-1)

So did you follow the URL https://ntl.fyi/exit-code-1 and see posts related to this error code?

Without seeing the deploy log, there is no way of telling what caused the error. Can you provide a link to it or paste the contents here?

Here’s the content of the deploy log:

5:12:29 PM: Build ready to start
5:12:31 PM: build-image version: d7b3813f01c06610bc1723ff1b22446513ee7941 (focal)
5:12:31 PM: build-image tag: v4.14.3
5:12:31 PM: buildbot version: d1344b6a6069b5a9790b0bc2308fa2d5761aa3e0
5:12:31 PM: Fetching cached dependencies
5:12:31 PM: Starting to download cache of 235.5MB
5:12:34 PM: Finished downloading cache in 2.97401187s
5:12:34 PM: Starting to extract cache
5:12:36 PM: Finished extracting cache in 2.274903692s
5:12:36 PM: Finished fetching cache in 5.319815177s
5:12:36 PM: Starting to prepare the repo for build
5:12:37 PM: Preparing Git Reference refs/heads/master
5:12:37 PM: Parsing package.json dependencies
5:12:39 PM: Starting build script
5:12:39 PM: Installing dependencies
5:12:39 PM: Python version set to 2.7
5:12:39 PM: Started restoring cached node version
5:12:40 PM: Finished restoring cached node version
5:12:40 PM: v10.24.1 is already installed.
5:12:40 PM: Now using node v10.24.1 (npm v6.14.12)
5:12:40 PM: Started restoring cached build plugins
5:12:40 PM: Finished restoring cached build plugins
5:12:40 PM: Attempting ruby version 2.6.2, read from environment
5:12:40 PM: Started restoring cached ruby version
5:12:40 PM: Finished restoring cached ruby version
5:12:41 PM: Using ruby version 2.6.2
5:12:41 PM: Using PHP version 8.0
5:12:41 PM: Started restoring cached yarn cache
5:12:43 PM: Finished restoring cached yarn cache
5:12:44 PM: No yarn workspaces detected
5:12:44 PM: Started restoring cached node modules
5:12:44 PM: Finished restoring cached node modules
5:12:44 PM: Installing NPM modules using Yarn version 1.13.0
5:12:44 PM: yarn install v1.13.0
5:12:44 PM: [1/4] Resolving packages…
5:12:45 PM: [2/4] Fetching packages…
5:12:53 PM: info fsevents@2.3.2: The platform “linux” is incompatible with this module.
5:12:53 PM: info “fsevents@2.3.2” is an optional dependency and failed compatibility check. Excluding it from installation.
5:12:53 PM: info fsevents@1.2.13: The platform “linux” is incompatible with this module.
5:12:53 PM: info “fsevents@1.2.13” is an optional dependency and failed compatibility check. Excluding it from installation.
5:12:53 PM: [3/4] Linking dependencies…
5:12:53 PM: warning “nuxt > @nuxt/components@2.2.1” has unmet peer dependency "consola@“.
5:12:53 PM: warning " > vuex@3.6.2” has unmet peer dependency “vue@^2.0.0”.
5:12:53 PM: warning " > vue-hamburger@0.1.2" has unmet peer dependency “vue@2.x”.
5:12:53 PM: warning " > vue-height-tween-transition@1.1.0" has unmet peer dependency “vue@2.x”.
5:12:53 PM: warning " > vue-in-viewport-directive@2.0.2" has unmet peer dependency “vue@2.x”.
5:12:53 PM: warning " > vue-in-viewport-mixin@2.0.3" has unmet peer dependency “vue@2.x”.
5:12:53 PM: warning " > vuex-pathify@1.5.1" has unmet peer dependency “vue@^2.5.19”.
5:12:53 PM: warning “vuex-pathify > vue-class-component@7.2.6” has unmet peer dependency “vue@^2.0.0”.
5:12:59 PM: [4/4] Building fresh packages…
5:13:01 PM: Done in 16.38s.
5:13:01 PM: NPM modules installed using Yarn
5:13:01 PM: Started restoring cached go cache
5:13:01 PM: Finished restoring cached go cache
5:13:01 PM: Installing Go version 1.12 (requested 1.12)
5:13:05 PM: unset GOOS;
5:13:05 PM: unset GOARCH;
5:13:05 PM: export GOROOT=‘/opt/buildhome/.gimme/versions/go1.12.linux.amd64’;
5:13:05 PM: export PATH=“/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}”;
5:13:05 PM: go version >&2;
5:13:05 PM: export GIMME_ENV=“/opt/buildhome/.gimme/env/go1.12.linux.amd64.env”
5:13:05 PM: go version go1.12 linux/amd64
5:13:05 PM: Installing missing commands
5:13:05 PM: Verify run directory
5:13:07 PM: ​
5:13:07 PM: ────────────────────────────────────────────────────────────────
5:13:07 PM: Netlify Build
5:13:07 PM: ────────────────────────────────────────────────────────────────
5:13:07 PM: ​
5:13:07 PM: ❯ Version
5:13:07 PM: @netlify/build 28.1.3
5:13:07 PM: ​
5:13:07 PM: ❯ Flags
5:13:07 PM: baseRelDir: false
5:13:07 PM: buildId: 635a4b7cee58b27246ab6c13
5:13:07 PM: deployId: 635a4b7cee58b27246ab6c15
5:13:07 PM: ​
5:13:07 PM: ❯ Current directory
5:13:07 PM: /opt/build/repo
5:13:07 PM: ​
5:13:07 PM: ❯ Config file
5:13:07 PM: /opt/build/repo/netlify.toml
5:13:07 PM: ​
5:13:07 PM: ❯ Context
5:13:07 PM: production
5:13:07 PM: ​
5:13:07 PM: ────────────────────────────────────────────────────────────────
5:13:07 PM: 1. Build command from Netlify app
5:13:07 PM: ────────────────────────────────────────────────────────────────
5:13:07 PM: ​
5:13:07 PM: $ CI= yarn generate
5:13:07 PM: yarn run v1.13.0
5:13:07 PM: $ nuxt generate
5:13:07 PM: WARN You are using an unsupported version of Node.js (v10.24.1). It is recommended to use the latest LTS version (GitHub - nodejs/Release: Node.js Release Working Group)
5:13:08 PM: WARN When using nuxt generate, you should set target: ‘static’ in your nuxt.config
5:13:08 PM: :point_right: Learn more about it on Nuxt - Going Full Static
5:15:04 PM: ERROR Error generating route “untitled-entry-2019-11-14-at-08-48-09”: Page not found
5:15:24 PM: ERROR Error generating route “untitled-entry-2020-11-03-at-18-29-19”: Page not found
5:15:34 PM: ERROR Error generating route “mgo-i”: Page not found
5:16:35 PM: ERROR Error generating route “untitled-entry-2020-05-29-at-17-43-36”: Page not found
5:16:37 PM: ERROR Error generating route “value-chain-transformation”: Page not found
5:17:18 PM: ERROR Error generating route “test-marquee”: Page not found
5:17:23 PM: ERROR Error generating route “untitled-entry-2020-04-16-at-23-09-35”: Page not found
5:18:12 PM: ERROR Error generating route “test-2”: Page not found
5:18:13 PM: ERROR Error generating route “untitled-entry-2019-11-14-at-09-36-02”: Page not found
5:18:21 PM: ERROR Error generating route “/article/cannabis-legislation-progress”: Page not found
5:18:24 PM: ERROR Error generating route “untitled-entry-2020-11-03-at-18-22-53”: Page not found
5:18:44 PM: ERROR Error generating route “untitled-entry-2020-04-24-at-15-32-29”: Page not found
5:19:47 PM: ERROR Error generating route “/maximizing-something”: Page not found
5:20:03 PM: ERROR Error generating route “/idea”: Page not found
5:20:04 PM: ERROR Error generating route “/insights”: Page not found
5:20:05 PM: error Command failed with exit code 1. (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
5:20:05 PM: info Visit yarn run | Yarn for documentation about this command.
5:20:05 PM: ​
5:20:05 PM: ────────────────────────────────────────────────────────────────
5:20:05 PM: “build.command” failed
5:20:05 PM: ────────────────────────────────────────────────────────────────
5:20:05 PM: ​
5:20:05 PM: Error message
5:20:05 PM: Command failed with exit code 1: CI= yarn generate (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
5:20:05 PM: ​
5:20:05 PM: Error location
5:20:05 PM: In Build command from Netlify app:
5:20:05 PM: CI= yarn generate
5:20:05 PM: ​
5:20:05 PM: Resolved config
5:20:05 PM: build:
5:20:05 PM: command: CI= yarn generate
5:20:05 PM: commandOrigin: ui
5:20:05 PM: environment:
5:20:05 PM: - CONTENTFUL_API
5:20:05 PM: - CONTENTFUL_HOST
5:20:05 PM: - CONTENTFUL_SPACE
5:20:05 PM: - GTM_ID
5:20:05 PM: publish: /opt/build/repo/dist
5:20:05 PM: publishOrigin: ui
5:20:05 PM: redirects:
5:20:05 PM: - force: true
5:20:06 PM: from: /people/
status: 301 to: /partner/:splat - force: true from: /idea/* status: 301 to: /article/:splat - force: true from: /industries/* status: 301 to: /industry/:splat - force: true from: /new/* status: 301 to: /article/:splat - force: true from: /service_leaders/* status: 301 to: /partner/:splat - force: true from: /category/* status: 301 to: /ideas - force: true from: https://www.eckhoff.com/* status: 301 to: Eckhoff and MGO Combination | MGO - force: true from: http://www.nussbaumcpa.com/* status: 301 to: Nussbaum and MGO Combination | MGO - force: true from: /article/new-jersey-cannabis-market-everything-you-need-to-know-in-2022 status: 301 to: /article/new-jersey-cannabis-market-everything-you-need-to-know redirectsOrigin: configCaching artifacts
5:20:06 PM: Started saving node modules
5:20:06 PM: Finished saving node modules
5:20:06 PM: Started saving build plugins
5:20:06 PM: Finished saving build plugins
5:20:06 PM: Started saving yarn cache
5:20:09 PM: Finished saving yarn cache
5:20:09 PM: Started saving pip cache
5:20:09 PM: Finished saving pip cache
5:20:09 PM: Started saving emacs cask dependencies
5:20:09 PM: Finished saving emacs cask dependencies
5:20:09 PM: Creating deploy upload records
5:20:09 PM: Started saving maven dependencies
5:20:09 PM: Finished saving maven dependencies
5:20:09 PM: Started saving boot dependencies
5:20:09 PM: Finished saving boot dependencies
5:20:09 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
5:20:09 PM: Started saving rust rustup cache
5:20:09 PM: Finished saving rust rustup cache
5:20:09 PM: Started saving go dependencies
5:20:09 PM: Finished saving go dependencies
5:20:09 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
5:20:09 PM: Failing build: Failed to build site
5:20:10 PM: Finished processing build request in 7m38.99845204s

Two issues here @tdorff

First is you are using an outdated and no-longer-supported version of Node.js as shown

and noted

You need to update the version of Node.js used for building your site to at least v14. See this documentation regarding how to do this.

Second, it appears you haven’t set the build to static as per

See Nuxt 2 - The target Property