Git command to computer over SSH

Hi, I have a lot of my projects on my NAS (running on windows), but it is more convenient for me to work on them from my main computer and then SSH to my NAS to test my changes. The problem is that I can’t use git commands like push,pull etc… from this SSH.
I always get the same error:

“Failed to enumerate credentials. [0x520]
a specified logon session does not exist. it may already have been terminated”

Then I’m asked for my github credentials but after entering them it still doesn’t work and returns an error “remote: Invalid username or password.”
What can I do because opening a remote desktop every time I need to interact with github is getting frustrating because the NAS is much less responsive than my main computer

thanks

I couldn’t figure exactly your current workflow, NAS setup and goals.

If I’ve understood correctly, you have a NAS which is running a Windows OS, right? I would rather call that a remote PC then, since it would be a full fledged OS, whereas most NAS usually have an embedded Linux just as a mean to manage services and interfaces.

Did you install Git for Windows on the NAS?
Also, Windows doesn’t natively support SSH, so you’ll have to setup that too (by installing some application and setting them up, and then allowing them through the firewall).

I’m not quite sure if these are two different problems or two faces of a same one.

The first could relate to Git credentials not having been set up correctly (or at all), or the lack of a credential manager (that gets installed with Git for Windows though).

The second one seems more serious, for it looks like you’re not logged in a user on the machine (hence the thought that the previous error might be relating to Windows credential instead of Git).

This is probably due to the fact the recently GitHub enforced PAT (Private Access Tokens), so you should create your PAT and use that instead of the old password whenever you’re asked for the password (the user remains the same, but the password can be used to log into GH website, but nor for Git operations, which now require the PAT instead).

Here is where I get lost … Why did you setup Git on your NAS in the first place? There aren’t many alternatives to using your NAS except via remote desktop. Unless you’re asking how to setup an SSH terminal connecting your PC to your NAS, is that it? yes, that might be faster, a tidy bit. You should install (well, just download and unZip really) PuTTY for Windows terminal + SSH, and then do a lot of configuration work on both machines (PC and NAS).

What’s your goal with all this? Being able to store your repositories on the NAS to save space, but have Git on your main PC? Well then you can just install your own Git server on the NAS, Git on your machine, and then you’ll be working with Git on your PC, storing copies of your repositories to your NAS and pushing/pulling changes directly from GitHub (all without the remote desktop, just via HTTP or SSH). But you’ll still need to have local copies of your repositories on the PC this way, at least while working on them (editing, etc.).

Git is decentralized and distributed version control system, so you’re not stuck with having just one server to work with (or even needing a server at all).

Hi , You are right its more like a remote desktop i guess but at first i used it only like a NAS that why i called it that way. I forgot to turn this topic closed because i actually found the solution.

I just added my SSH key to github and now use ssh to access the repo, am no longer using HTTP wich was the problem because with an SSH sessions I couldn’t access Windows stored credentials.

The reason i use my NAS for git, is that I have projects with friends (discord bots, camera motion detection, ect…) that run on my server instead of my main PC,

I still edit the code on my main PC thanks to the Network drive,the i use the SSH terminal to start the script but then, when i want to commit change to github i still use the SSH terminal.

So yeah if people are having the same issue,i added the repo “git remote” and then added my NAS ssh public key to Github, now it works flawlessly. But still thanks tajmone i didn’t know about this

i used OpenSSH it never failed me but I still have PuTTY

No need to, people with similar issues will still benefit from this thread in the future. Also, I’ve setup my own Git server on a NAS too, so I like to read about how others got around to it with different solutions.

Mine is a just low-budget off-the shelf NAS, with a mini Linux embedded OS and no admin credentials for me. So the only way I can install any software (or updates) is via the native WebUI that comes with it (it’s an old D-Link NAS).

I was lucky enough to manage to sort of hack around its OS by installing an update for the same model created for another country, yet not bricking the NAS (which would have ended it in the trashcan if it went wrong). Thanks for this update I managed to install Java and Gitblit , a pure Java stack for hosting Git repositories. (both installed Java and Gitblit are very old versions, due to lack of NAS updates, but that’s OK).

Gitblit is quite a nice tool, like a small-scale GitHub running on my NAS — multi-users allowed, settings, and other cool features. But I used it mostly for myself, as an Intranet Git hosting service that can be accessed by different PCs and OSs.

Your NAS machine sound more powerful (has to be if it can run Win OS, so I’m guessing its and x86 processor, unless you’re running the Win10 version of ARM).

There are many FOSS Git stacks in the wild, but most of them are Linux only, so I guess that under a Win NAS you’re options are limited to Java stacks. Gitblit is also available for Windows, with dedicated setting to run out of the box without having to shave yaks, so you might consider giving it a try, especially if you’re sharing your NAS with friends — you’ll be the admin of your own Git hosting service, giving out accounts, etc., and Gitblit has tons of settings for security and customizing users privileges (and its fun).

I’m not sure if Gitblit enforces files case-sensitivity under Win OS, but now with Win 10 you can set specific directories to be case-sensitive, and work just like under Linux:

Good to know, I’ll keep OpenSSH in mind for when I finally resolve to setting it up (procrastinating).

Your NAS machine sound more powerful (has to be if it can run Win OS, so I’m guessing its and x86 processor, unless you’re running the Win10 version of ARM).

Yeah it is an old Asrock 3D vision with a fried GPU… I repaired it by instaling a external video card instead of the wifi card. I also changed the boot drive for an SSD as I also use this NAS as a Homebridge server.
When I say it is slow, it’s because it’s old…Linux was my first choice but it didn’t like the external GPU and refused to boot, that why I test in a lost attempt with windows, I didn’t expect it to work.
It running on an i5 560M, 8GB of ram, and a 8500GT that was lying around,
But it is mostly the Remote desktop interface that is slow AF

especially if you’re sharing your NAS with friends

Am not sharing the Machine with friends, i just use it as a server on wich i can run services (like Homebridge, or discord bot, or game servers: Minecraft, beamNG).

Good to know, I’ll keep OpenSSH in mind for when I finally resolve to setting it up (procrastinating).

I think OpenSSH is the best for now once it activated on windows, it can run directly in CMD and can just as easy do Port forwarding

Am what i can call a noob at Git, So for now Github servers will be the best options, and also my internet connection is hot trash so hosting the repo will probably make my friend bald,

My only goal now is to host a VPN on it to acces my home network from everywhere.

Setting up a NAS for the first time can be really challenging, especially if it not an out-of-the-box product like mine was — still, I had to do quite some searching and reading to wrap my ahead around what I was trying to do.

That’s quite a power horse of a NAS! Impressive. These are basically the same specs of my desktop PC for everyday work. I love the i5 processor, it has provided me with a really nice user experience, much better than previous PCs. Nowadays you can get these hardware specs as Mini-ITX boards, which are really nice and lower-power consumption — but still very expensive, compared to ARM/RISC hardware.

I noticed that too. My main desktop PC and the NAS are cable-connected directly to the router, so speed is not a major issue when connect these two. Other machines in the house either connect via Ethernet over electric cables (not too bad, but definitely not as fast as advertised), or via WiFi (quite slow).

That’s really cool. I helped a friend set up a VPN connecting his home, his shop and his mountain retreat, with home automation gadgets and interfaces — we had even set-up webcams to check on his chickens in the mountains, and set-up an Internet-driven feeding system. It was a fun experiment, and his chickens got really fat with all the extra seeds they got whenever he showed off his system to friends. :wink:

It’s always nice to have exchanges on these topics, it’s a chance to learn new things and workarounds that one might have not thought about. Thanks @noenic

That’s really cool. I helped a friend set up a VPN connecting his home, his shop and his mountain retreat, with home automation gadgets and interfaces — we had even set-up webcams to check on his chickens in the mountains, and set-up an Internet-driven feeding system. It was a fun experiment, and his chickens got really fat with all the extra seeds they got whenever he showed off his system to friends.

that’s awesome !

It’s always nice to have exchanges on these topics, it’s a chance to learn new things and workarounds that one might have not thought about. Thanks

Totally agree Thanks tajmone