# Projects problem with git credentials

**URL:** <https://discourse.nodered.org/t/projects-problem-with-git-credentials/51244>\
**Category:** General\
**Created:** [19 September 2021 16:58 UTC](https://discourse.nodered.org/t/projects-problem-with-git-credentials/51244 "2021-09-19T16:58:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daniel2/32/48222_2.png) [@daniel2](https://discourse.nodered.org/u/daniel2)\
**Post date:** [19 September 2021 16:58 UTC](https://discourse.nodered.org/t/projects-problem-with-git-credentials/51244/1 "2021-09-19T16:58:56Z")

</div>

I tried using the [Node-RED Projects feature](https://nodered.org/docs/user-guide/projects/) but can't get it working.

**specs:**  
running as docker container:  
`image: nodered/node-red:latest`  
with a reverse proxy between, doing the authentication part (if that matters).

Node-RED version: `v2.0.6`  
Node.js version: `v14.17.6`  
git version: `2.24.4`  
"raw" installation, so no (additional) modules installed

Error message, when I try to create a new project:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/6/b676e70f6358411c0146e7e54d86465a4bd8b018.png)

I tried multiple git credentials but these are "not working":

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/a/dab4ddaa8cf44c7261acf32f916a83c93456bba5.png)

also if I generate a ssh-key it didn't work.

---

<div class="post-metadata">

**Author:** ![daniel2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daniel2/32/48222_2.png) [@daniel2](https://discourse.nodered.org/u/daniel2)\
**Post date:** [19 September 2021 17:12 UTC](https://discourse.nodered.org/t/projects-problem-with-git-credentials/51244/2 "2021-09-19T17:12:29Z")

</div>

And I can say, my docker image is up to date, as the output of the following command is the below:  
`docker image pull nodered/node-red:latest`

```auto
latest: Pulling from nodered/node-red
Digest: sha256:ddd05759e91dce9db82d36a3df66011936cc49d59ac329589df379c44e74867e
Status: Image is up to date for nodered/node-red:latest
docker.io/nodered/node-red:latest

```

If you have any ideas or need some informations, don't hesitate to write to me.  
Thank you.

---

<div class="post-metadata">

**Author:** ![daniel2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daniel2/32/48222_2.png) [@daniel2](https://discourse.nodered.org/u/daniel2)\
**Post date:** [24 October 2021 16:17 UTC](https://discourse.nodered.org/t/projects-problem-with-git-credentials/51244/3 "2021-10-24T16:17:06Z")

</div>

As I tried a third time, I updated the image to the new node-red version 2.1.  
While updating I thought, maybe the settings could differ so I let it create default settings.js which brought the projects working. So there is definitely a error in my configuration, so I'd thought of sharing it here.

difference to default settings.js:

1. as [described in docs](https://nodered.org/docs/getting-started/docker#credentials-secrets-and-environment-variables), to make it read the env var for credential secret

```javascript
module.exports = {
    credentialSecret: process.env.NODE_RED_CREDENTIAL_SECRET,
//...}

```

**2. I disabled auth beucase I use another authentication mecanism. _(this was the problem! 🤨 🙁)_**

```javascript
adminAuth: {
    type: "credentials",
    default: {
        permissions: "*"
    }
},

```

1. editor theme `midnight-red` 4. codeEditor lib `monaco` and 5. theme `tomorrow-night`

```javascript
editorTheme: {
    theme: "midnight-red",
    projects: {
        enabled: true,
        /* true or false no difference here, because I set it over environment variable */
        workflow: {
            mode: "manual"
        }
    },
    codeEditor: {
        lib: "monaco"
        options: {
            theme: "tomorrow-night",
        }
    }
},

```

- If I only have 1 and 3 (only `theme`) projects work.
- (it looks to me as) **2 is the problem** , also somehow not even neccecary anymore in this new version (2.1)

---

<div class="post-metadata">

**Author:** ![daniel2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daniel2/32/48222_2.png) [@daniel2](https://discourse.nodered.org/u/daniel2)\
**Post date:** [24 October 2021 18:23 UTC](https://discourse.nodered.org/t/projects-problem-with-git-credentials/51244/4 "2021-10-24T18:23:03Z")

</div>

I still don't know why, but the problem occurs definitely when disabling auth with following `settings.js`:

```javascript
module.exports = {
    adminAuth: {
        type: "credentials",
        default: {
            permissions: "*"
        }
    },
}

```

So if you run into the same problem, you might be fine by just removing/commenting out that part of `settings.js`.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [7 November 2021 18:23 UTC](https://discourse.nodered.org/t/projects-problem-with-git-credentials/51244/5 "2021-11-07T18:23:32Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
