# Push to git problem

**URL:** <https://discourse.nodered.org/t/push-to-git-problem/52526>\
**Category:** General\
**Created:** [21 October 2021 19:06 UTC](https://discourse.nodered.org/t/push-to-git-problem/52526 "2021-10-21T19:06:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [21 October 2021 19:06 UTC](https://discourse.nodered.org/t/push-to-git-problem/52526/1 "2021-10-21T19:06:52Z")

</div>

Trying to setup a push to git  
What i did  
enabled projects  
did project settings and credentials  
set git remote with https

from hamburger menu settings\>Git config\>create ssh key  
copied ssh key to git page Deploy keys and give write access

then go to project history +all  
commit history  
then click Remote : None

then i get Authentication required for repository  
when i use my login credentials for git i get the same screen again and again...

i do something wrong but no idea what.

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [21 October 2021 19:17 UTC](https://discourse.nodered.org/t/push-to-git-problem/52526/2 "2021-10-21T19:17:13Z")

</div>

changed from https to ssh://

Then it gives me the SSH key that i have made  
And asks for Passphrase, when i enter the Passphrase of the key then i get the screen again

also did a node-red-restart, no succes

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [21 October 2021 19:26 UTC](https://discourse.nodered.org/t/push-to-git-problem/52526/3 "2021-10-21T19:26:12Z")

</div>

If you are using `https` with github, then you need to use your username and a Personal Access Token you've generated in your GitHub account - they no longer let you use your regular github password for https access.

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [21 October 2021 19:38 UTC](https://discourse.nodered.org/t/push-to-git-problem/52526/4 "2021-10-21T19:38:43Z")

</div>

Thanks, now i get no question again, but i cannot see files on git after pushing push  
Is there a munual for setting this up? Cannot find it

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [21 October 2021 19:55 UTC](https://discourse.nodered.org/t/push-to-git-problem/52526/5 "2021-10-21T19:55:51Z")

</div>

With the https i got it running  
Problem was a hidden email address, the logs helped me with that.

Now i set up a test with laptop (osx ) and a pi  
I added something on my laptop a text node and updated it to git

on my pi i do a pull  
this give me the error below

```auto
An unexpected error occurred:

Cannot read property 'fetch' of undefined

code: unexpected_error

```

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [21 October 2021 20:20 UTC](https://discourse.nodered.org/t/push-to-git-problem/52526/6 "2021-10-21T20:20:59Z")

</div>

fixed with a reboot.

last question.  
is it possible to add a folder with images to the sync?

---

<div class="post-metadata">

**Author:** ![ikidd](https://avatars.discourse-cdn.com/v4/letter/i/f04885/32.png) [@ikidd](https://discourse.nodered.org/u/ikidd)\
**Post date:** [8 November 2021 18:14 UTC](https://discourse.nodered.org/t/push-to-git-problem/52526/7 "2021-11-08T18:14:21Z")

</div>

Seeing the same thing. I've created a key in the NodeRed general settings, I see the keypair in ~/.node-red/projects/.sshkeys folder and have added the public key to my Github keys in Account Settings. I attempt to Manage Remote branch that I've added in the Project Settings as ssh://git@github.com:ikidd/"myreponame".git and it says authentication required and just keeps showing my SSH Key in the dropdown but never logs in. If I cancel, it doesn't let me choose a branch or create an origin:main link.

I've added the github public key for their SSH host to known\_hosts in the service users .ssh folder by attempting an ssh login to [git@github.com](mailto:git@github.com) and saying Yes when it verifies the identity of the server.

I've changed the remote repo between private and public and restarted nodered, does not seem to help.

I have had this work, but had to do some manual git linking at the projects local repo folder and still had to come into the NR page and link them, but at least at that point it prompted me to Create origin:main link to click on.

I'd prefer to figure out whatever method the Project developers were thinking of to get these repos to link and enable pushes.

---

<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 January 2022 18:15 UTC](https://discourse.nodered.org/t/push-to-git-problem/52526/8 "2022-01-07T18:15:13Z")

</div>

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