This forum is no longer active. Please post your questions to our new community site

Problem with git on RubyStack vm

Subscribe to Problem with git on RubyStack vm 8 post(s), 5 voice(s)

 
Avatar ratnik 6 post(s)

Hello

I have a problem with git on RubyStack virtual machine.

I performed the following steps:

- firstly setup the remote repository on my RubyStack vm:

  1. mkdir /root/projects/test/.git
  2. cd /root/projects/test/.git
  3. git init —bare
    Initialized empty Git repository in /root/projects/test/.git

- on my local Windows XP machine:

$ cd my_project
$ git init
$ git add *
$ git commit -m “My initial commit message”
$ git remote add origin root@192.168.1.2:projects/test/.git
$ git push origin master

Git successfully connected to root@192.168.1.2 and requested to enter the password for the root user. I entered the correct password and after that received the following error message:

git: ‘projects/test/.git’ is not a git-command. See ‘git –help’
fatal: The remote end hung up unexpectedly

ssh works fine, I can connect to vm using Putty without problems.
I also stoped the firewall on vm and on my local machine and tried
to use different paths in origin projects/test, root/projects/test/.git
and other combinations, but always get the same error.

Please help to solve this problem.
-
Thank you in advance.

 
Avatar danoo Administrator 81 post(s)

Hi,

Can you please try to add ‘git’ command to the PATH environment variable inside /root/.bashrc:

PATH=/opt/bitnami/git/bin:$PATH

or just insert the following snippet to the same file:

. /opt/bitnami/scripts/setenv.sh

Let me know if this works for you.

Cheers.
Danoo

 
Avatar ratnik 6 post(s)

Thank you for your reply!

The path to /opt/bitnami/git/bin included in the PATH variable by
default. All git commands like pull, clone, fetch, etc worked fine.
But git push did work at all. I modified the /root/.bashrc and
included the path to /opt/bitnami/git/libexec/git-core into the
PATH variable, see bellow:

#!/bin/sh
if [ -r “/opt/bitnami/scripts/setenv.sh” ]; then
. /opt/bitnami/scripts/setenv.sh
fi
PATH=/opt/bitnami/git/libexec/git-core:$PATH
if [ -x “/root/change-root-password.sh” ]; then
/root/change-root-password.sh
fi

After that the problem has been solved !!!

Please add this path into the PATH variable by default
in the next RubyStack vm release. Thank You.

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Thanks for reporting this issue. We will fix it for the new version of RubyStack.

 
Avatar makka 2 post(s)

I’m running the latest VMWare image with ubuntu but I’m running the same issue.

HTH
makka

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

Sorry we did not release the new version yet, we are working to add new features. We will try to release soon. You can fix the issue with the danoo and ratnik solutions.

 
Avatar frequencydip 11 post(s)

You can also call git directly until this is fixed

/opt/rubystack-2.1-0/git/bin/git

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Right, we will release a new version soon.