0

On a remote AWS server, I have created a git repo inside a folder. Now I need the http adress to clone the project from my local computer. But I haven't found any git method to show me this address. Is there such a method?

I tried an address but it says fatal: repository (..) not found.

Here is what I do basically:

I am logged by SSH as ubuntu. (ubuntu has a folder at /home/ubuntu if this matters)

The webpage is at: /var/www/webpage.com/

My git project is at /var/www/webpage.com/thing

So what I have tried locally is this: git clone https://webpage.com/thing.git

What would be the correct clone addres?

Galivan
  • 4,842
  • 9
  • 44
  • 76
  • These comments make absolutely no sense. Why would you ask about HTTP when he is clearly "logged by SSH as ubuntu"? Also, a git server? Telling someone to use a third-party service for cloning a repository? Reported. – Nei Neto Aug 25 '20 at 00:53

1 Answers1

1

Assuming server name to be server and user name user.

On your server run:

cd ~
git init --bare testrepo

On your personal machine:

git clone user@server:testrepo.git/

Refer to this answer for more details on absolute paths vs paths relative to your home folder like I used.

Nei Neto
  • 438
  • 2
  • 9