fatal: does not appear to be a git Repository

Asked

Viewed 771 times

4

I’m trying to set up a private Git repository on shared hosting via SSH.

I do the whole process of configuring the keys etc,e giving git init in the repository but when I put

git remote add deploy ssh://USUARIO@IP-DO-SERVIDOR:2222/public_html/wordpress-studies

At the time of giving git push -u deploy master appears:

fatal: '/public_html/wordpress-Studies' does not appear to be a git Repository fatal: Could not read from remote Repository.

What does that mean?

EDIT:

Ok... what I was missing was that I didn’t know the difference between the repository and the folder that had the work tree from which I would receive the files from the Bare repository. But I still can’t solve the problem.

What have I done so far? I created a repository in the off-site public_html folder called "wordpress-Studies.git". I applied the "git init --Bare" command to it; having done so, I created and edited the post-receive file with:

#!/bin/sh
  echo "********************"
  echo "Post receive hook: Updating website"
  echo "********************"

  GIT_WORK_TREE=/public_html/wordpress-studies

I saved and made it executable with "chmod +x hook/post-receive." and git remote add deploy ssh://MEUSERVIDOR/home/protodes/wordpress-Studies.git

And then...

git remote add origin [email protected]:rafandrade/wordpressstudies.git

when I give "git push deploy master" it appears here:

$ git push origin master
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 470 bytes | 470.00 KiB/s, done.
Total 4 (delta 1), reused 1 (delta 0)
To bitbucket.org:rafandrade/wordpressstudies.git
ec26746..e1b4c86  master -> master

But when I check the folder it doesn’t contain the files that were added in the commit

  • You are trying to point a "physical" path as if it were a repository?

  • public_html is in the root directory? The path '/public_html/wordpress-Studies' starts with '/' which means the root directory.

  • @Guilhermenascimento I basically created a folder in my hosting and gave "git init" so that I could see what I did there and thought that was the definition of repository, but reading more I saw that it wasn’t. I’m reading more on the subject here...

  • 1

    edited the post, reporting the steps in more detail

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.