✓ Solved

Git server (not cloning others, being the server cloned from)

I spent an entire day trying numerous tutorials, how to, first time setup/etc for a git server. Every one seemed to focus on "set up the server, then clone a project"

I don't need to clone a project locally, I need the server to be the server that others clone projects from (where a push would have to be done to get things to it first). I setup the http (through multiple tutorials/etc), but pushes from Visual Studio always failed with either "not a git" or just it knew it was one, but it couldn't do things with the http for "some reason". Nothing allowed me to put the first project on it, and everything was saying "clone a project to get it on there" but you can't clone source code from Visual Studio to a new install.

I'm just needing the server to be a private, upload new code from one Visual Studio location, then pull it down to others as needed when people are away from home--making it require http access I believe.

This didn't help:

https://www.linode.com/docs/guides/how-to-configure-git/

And even things here didn't work:

https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup

I had even followed somethings in a "copy paste" method, and that didn't work. Because I couldn't push anything to it from Visual Studio without errors relating to the http (or 'not a repository' that popped up a few times then disappeared after 'something' [changing folder didn't work, the git init was already run, and the files were there--re-running the git init sometimes worked, sometimes not]).

3 Replies

✓ Best Answer

@DianeLeigh --

You write:

I'm just needing the server to be a private, upload new code from one Visual Studio location, then pull it down to others as needed when people are away from home--making it require http access I believe.

If the number of people is small, you can just use ssh(1) for this. There's no server required and you probably have ssh(1) set up on your Linode already…you just need to make sure it's set up so your team can login without entering passwords (you said the clients were Visual Studio):

https://phoenixnap.com/kb/generate-ssh-key-windows-10

https://docs.microsoft.com/en-us/visualstudio/version-control/git-with-visual-studio?view=vs-2019

Hint: When generating ssh key pairs, at the "Enter a passphrase…" prompt, just hit return for no passphrase. Your life will be so much easier.

Every user of this scheme needs a login on your Linode and every team member must upload their public key file to the Linode. Once everyone has password-less ssh(1) access to your Linode, it'll all just work.

None of this set up is any different than what you would do to allow

ssh my.gitserver.com

from a cmd window on your Windows machine. If you have that already, you're golden. Instead of

git clone https://my.gitserver.com/foo.git .\foo

you would do

git clone my.gitserver.com:/path/to/foo.git .\foo

VS's git(1) integration should take care of most of this for you…

Note that this does not prevent you from using GitHub or other services that have git(1) services over http.

-- sw

I’m personally a huge fan of Gitea. It’s a simple Go binary that provides a GitHub-like web UI where users can self-register (if you desire), create repos, do pull requests, etc.

It supports cloning over HTTPS and SSH, has a lightweight issue tracker and project boards.

https://gitea.io

Couldn't accept both, but both seemed to work (actually for simplicity I tried the Gitea to see what it'd do, and it worked without thought), but both work as well.

Thanks :)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct