1

I am trying to add remote using git remote add and than am trying to push to that remote but am getting following errors:

fatal: 'adoshi_01': unable to chdir or not a git archive
and
fatal: The remote end hung up unexpectedly

Steps followed:

  • First of all I cloned from git/repos/scripts to home/adoshi/repos/scripts using command git clone git01.dev:home/git/repos/scripts.git,
  • after doing this I looked at home/git/devs/adoshi folder and there were not entries for scripts and I am still wondering why.
  • Then I tried to add files using git add .
  • Then committed them using git commit –am “Detailed Message”
  • Added remote using git remote add adoshi_01 git01.dev:/home/git/devs/adoshi/scripts/ - Thing to notice there is not scripts folder in git01.dev
  • Tried to push using git push adoshi_git01 master – But again it gave me error

I think main issue here =
On git01.dev:/home/git/devs/adoshi/, “scripts” folder was not created even after I cloned it in 1st and so am still wondering as to what might be the possible reason for that.

Any guidance would be highly appreciated.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Rachel
  • 100,387
  • 116
  • 269
  • 365
  • Did you troubleshoot the issue as described in http://stackoverflow.com/questions/922210/unable-to-git-push-master-to-github ? – VonC Dec 07 '09 at 21:09

2 Answers2

0

Do you have write permissions on the appropriate directories on the server?

Hank Gay
  • 70,339
  • 36
  • 160
  • 222
0

Using git-push will not create a repository on the other end. Assuming you have shell access to git01.dev, first create a bare repository to hold your public repository:

ssh git01.dev git init --bare /home/git/devs/adoshi/scripts.git

Now clone the shared repo:

git clone git01.dev:/home/git/repos/scripts.git

Now move into your cloned repo and push it to your new bare repository:

cd scripts
git remote add adoshi_01 git01.dev:/home/git/devs/adoshi/scripts.git
git push --all adoshi_01
Greg Bacon
  • 134,834
  • 32
  • 188
  • 245
  • I have followed the same steps mentioned in questions and am getting exact response out as fatal errors also mentioned in email. – Rachel Dec 07 '09 at 21:16