0

I'm new to git but I've had things flowing fairly well until I tried pushing to my private server directly from my local machine using SSH. My local config, using an absolute path is the following:

[remote "origin"]

url = ssh://j@***.com:52836/home/j/www/wc.git
fetch = +refs/heads/*:refs/remotes/origin/*

My server's config is set as bare. When I push, after passwording in, I get the following error: stdin: is not a tty fatal: '/home/j/www/wc.git' does not appear to be a git repository fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I've cloned both my local repo and my private server from my bitbucket account. I want to be able to push from my local machine to both (using the pushurl) - but I simply cannot find my private server's repo. However, I can update my private server and bit bucket AND I can update my local machine and bit bucket. I simply cannot connect my local machine and private server (which is my production server). My private server repo is located at /Users/mark/sites/wc/. The .git folder is inside the wc folder.

I've tried Git "does not appear to be a git repository" and How to check the validity of a remote git repository URL? with no luck.

17
  • It get it that your private server is not in your local machine, right? Commented Aug 19, 2014 at 1:32
  • Right - my private server is in the internets. Commented Aug 19, 2014 at 1:34
  • You say that your "server's config is set as bare" and that it's path is "/home/j/www/wc.git" but you then later say that the private repo path is "/home/j/www/wc" and it has a ".git" folder in it. So what, exactly, is the path on the remote (private) machine and is the repo on that machine actually bare? Commented Aug 19, 2014 at 1:37
  • Do you have j@*** on your ~/.ssh/config ? Anyway, try to set the url to ssh://j@***.com:52836:/home/j/www/wc.git (mind the : after the port number). Commented Aug 19, 2014 at 1:39
  • 1
    wc/.git doesn't look like a bare repo... or if it is a bare repo it is an oddly named one. In either case you need to point your config at the toplevel of a bare repository. And besides that wc.git and wc/.git are not the same path. Commented Aug 19, 2014 at 2:06

1 Answer 1

1

Some sort of path or bare repo confusion appeared to be at work here. Resolution was to recreate the private repo ensuring that it was a bare repo and to point the remote url config entry at the correct path.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.