S
S
sawa42017-07-11 12:38:57
git
sawa4, 2017-07-11 12:38:57

How to setup git fatal: Couldn't find remote ref master on site?

There are several sites on the server, and there is SSH access. Git is configured on one domain.
The question is how to set up git for the second site (domain)?
I do it on the server git init
Locallygit init

git remote add origin ssh://[email protected]/var/www/second.site
git pull origin master

After entering the password, I get the error:
fatal: Couldn't find remote ref master
fatal: The remote end hung up unexpectedly

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sawa4, 2017-07-11
@sawa4

It turns out on the server in the root of the site

git init
git add --all
git commit -m 'All files'

On local server
git init
git remote add origin ssh://[email protected]/var/www/somedomain
git pull origin master

and enter password for sshuser

P
pantagruel964, 2017-07-11
@pantagruel964

So maybe you should push? Or what are you trying to do?
Why don't you do it through a hook?
Watch the video

P
Puma Thailand, 2017-07-11
@opium

So you do not init, but a git clone

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question