Adding a project to a git repository

Hi all, I'm trying to put my project on github but somewhere something is going wrong.
I created an empty repository on my github account, enabled projects in Node-Red, and added my github repo url to the Node-red project settings. Local project history works ok, nothing happens online.

In the 'commit history' menu I found a dialog behind the button with up/down arrows ('manage remote branch', quite well-hidden ), where it says there is no remote branch.
Isn't that what I just set up via the 'settings' dialog?

Anyway, when I try to set up a remote branch there Node-red is asking for credentials, and I'm at a loss which credentials are needed. My Node-Red project password, my github password, my custom key? I tried them all, none work.

Can anybody give me a hint?

I have integration with github working, but have a related problem.

I'm certainly not the right person to answer the OP's question, but can perhaps add my issue.

When I get github integration working (which seems random), the next time I try to push changes to github from the interface, the connection is broken again.

Is there a guide on how to set up github integration? I've messed around and gotten it to work, but it's erratic!

This is the error I keep getting.

Unable to access remote repository

Retry

H

You have to create a Personal Access Token in your GIT account. You then enter this token in the authorisation box in node red in the User Name field. Leave the Password field empty.

1 Like

Suddenly it works, thanks!
Problem is, I'm not sure how I did it.
In my opinion, all things Git are thoroughly confusing.
(and it seems I'm not the only one)

Drat. I still get the same error.

Unable to access remote repository

Retry

H

Hi, did you enable repository access when you created the token? You have to tick the boxes.

I did.

I don't get it.

But I'll look later. It's been erratic for months.

Right...I still can't make it work.

I put the personal access token in, no password, when that option appears.

I have the general git config set up with username and email.
The remote is configured in Project Settings.

Is it a thing where you get one chance? When it doesn't work, i delete and then re-add the remote. Then I get another chance to log in with the personal access token. But then it still doesn't work.

Clearly, I'm doing something silly.

H

I think I found the answer.

The repo we've got our Node-Red code in is in a Git Organization.

In a git organization, there is a setting that allows - or does not allow - personal access tokens to access repositories in that organization. So even if your personal access token is set to access repositories, the settings in the organziation can overrule that.

See here.

Once I changed the setting to allow personal access tokens to have access, then it "just worked".

2 Likes

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