git remote add upstream

Started by opnsenseuser, July 27, 2025, 11:54:32 AM

Previous topic - Next topic
if i try to add the git upstream to f.e. "core", like git remote add upstream https://github.com/opnsense/core.git i get the error fatal: not a git repository (or any of the parent directories): .git

does anything change?

regards rené
Supermicro A2SDi-4C-HLN4F
Team Rebellion Member (sidebar / themes: tukan, cicada & vicuna)

Quote from: opnsenseuser on July 27, 2025, 11:54:32 AMerror fatal: not a git repository (or any of the parent directories): .git
That means that the directory you are in - locally - is not a git directory.
Deciso DEC740

how can i fix this. this works for me since 10 years
Supermicro A2SDi-4C-HLN4F
Team Rebellion Member (sidebar / themes: tukan, cicada & vicuna)

Quote from: opnsenseuser on July 27, 2025, 01:19:45 PMhow can i fix this. this works for me since 10 years
Make sure the directory you are in is a git repo. What is the path you are in and what is the output of 'git status'?

Something changed locally and only you can know what that is. Are the permission correct? What is the OS the directory is on?
Deciso DEC740

ok, thx for your support. now it works. i reinitialized the repo using
Quotegit init
Supermicro A2SDi-4C-HLN4F
Team Rebellion Member (sidebar / themes: tukan, cicada & vicuna)

no, it doesn´t work. i did full access on both folder "core" and "plugins" on my local drive. but when i try to clone. it says:" No such file or directory"

what can i do?
Supermicro A2SDi-4C-HLN4F
Team Rebellion Member (sidebar / themes: tukan, cicada & vicuna)

What are you trying to do? Do you have your own 'core' and 'plugin' repos? If you want to checkout then 'git clone <repo>' is what you want to use.

But if you use 'git' for 10 year you surely know about a git repo structure, like the '.git' folder within a repo. But you haven't answered which OS you are using.
Deciso DEC740

July 28, 2025, 05:41:34 PM #7 Last Edit: July 28, 2025, 05:43:38 PM by opnsenseuser
This message i get in "github for desktop" using windows as my operating system.

QuoteD:/opnsense-github/core/.git: No such file or directory
Cloning into 'D:\opnsense-github\core'...

Would you like to retry cloning ?

i reinstalled "github for desktop" and set the permissions (full access) for the whole folder "D:\opnsense-github" to "everyone". but even then i get this error message. i really don´t know why.
what can i do?

syncing using my batch file works without any problems.

Quoted:
cd opnsense-github\core
git pull upstream master
cd..
cd plugins
git pull upstream master
pause



Supermicro A2SDi-4C-HLN4F
Team Rebellion Member (sidebar / themes: tukan, cicada & vicuna)

I don't use Windows, someone else may chime in who does use git on Windows.
Deciso DEC740

ok, i fixed it. it was a windows problem. suddenly the windows Folder protection was active on drive d:\ .Maybe a windows update caused this problem.

thx for your support
Supermicro A2SDi-4C-HLN4F
Team Rebellion Member (sidebar / themes: tukan, cicada & vicuna)