> > I described the whole process how I got this working without the errors >> when I tried to pust to the remote repository, in the hopes it might help >> someone else. I could have been here till the cows came in, if it hadn't >> been for matthew Caron and his constant help. > > >> >> At the Server : > > >> I restored the server boot disk from an earlier backup, and started over >> again by getting the osx installer from the git official site. > > ---------- > > Latest stable release (download installer) > > 1.7.11.1 > > Release Notes (2012-06-21) > > >> http://git-scm.com/download/mac > > ---------- > > >> Double clicked on the installer from the git site, installed and >> restarted the server. After it came up to speed I checked : > > >> $ which git > > ---> /usr/local/git/bin/git > > >> Which shows a non standard path as you can see. > > >> The OSX Server (Snow Leopard) configuration that I am using, has one >> local admin user with a home directory. The other users are not local >> users, but LDAPv3 users, so they exist for the purposes of authentication, >> etc., and have no home directories assigned to them, which is where the >> problem with the 'interactive shell path' vs the 'non-interactive shell >> path' comes into play. > > >> I don't know where the main system wide 'non-interactive shell path' is >> set at, but one place I was able to set the 'non-interactive shell path' is >> at ~/.bashrc . Since I did not have a home directory on the server, there >> was no way to access ~/.bashrc in order to add the git path. So with this >> problem in mind, I created a home directory for myself and added a >> ~/.bashrc file. > > >> I noticed that if I SSH into the remote server via > > >> local $ ssh roscoe@192.168.1.45 > > >> then try to get the $PATH via : > > >> server:~ roscoe $ echo $PATH > > ---> >> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin > > >> the path that is returned is the 'interactive shell path'. Good so far... > > >> But if instead of logging into the server via ssh, I just issue a remote >> command (as shown below), then I get the 'non-interactive shell path', >> which is different from the one above... > > >> $ ssh roscoe@192.168.1.45 'echo $PATH;' > > ---> /usr/bin:/bin:/usr/sbin:/sbin > > >> So with this problem in mind (this is a little repetitious, but bare with >> me), I created a home directory for myself on the server and added a >> ~/.bashrc file with the following contents, with the last two lines only >> used during testing... > > >> # (BEGIN) ~/.bashrc > > GIT_PATH=/usr/local/git/bin > > PATH=$PATH:${GIT_PATH} > > export PATH > > >> echo -e "GIT_PATH = ${GIT_PATH} : path set in /Users/roscoe/.bashrc" > > echo -e "Called from : /Users/roscoe/.bashrc \nThe current path is : >> ${PATH}" > > # (_END_) ~/.bashrc > > >> >> On the next command, I get the correct value for the 'non-interactive >> shell path', which includes '/usr/local/git/bin', hallelujah... > > >> $ ssh roscoe@192.168.1.45 'echo $PATH;' > > ---> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin > > >> If I now SSH into the server, I notice below that the path I added in >> ~/.bashrc does not create a duplicate entry in the 'interactive shell path' > > >> SSH into the server, then check the 'interactive shell path' > > >> $ ssh roscoe@192.168.1.45 > > ---> Password: > > >> server:~ roscoe $ echo $PATH > > ---> >> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin > > >> server:~ roscoe $ > > >> Sure enough, everything appears OK now. I will test this out ! > > >> $ cd 'data/git/sandbox/tmp/' > > >> $ pwd > > ---> data/git/sandbox/tmp > > >> $ git status > > ---> # On branch master > > ---> nothing to commit (working directory clean) > > >> Made some slight changes to the file 'projects/www/index.php' in order to >> get a valid change in status > > >> $ git status > > ---> # On branch master > > ---> # Changes not staged for commit: > > ---> # (use "git add <file>..." to update what will be committed) > > ---> # (use "git checkout -- <file>..." to discard changes in working >> directory) > > ---> # > > ---> # modified: projects/www/index.php > > ---> # > > ---> no changes added to commit (use "git add" and/or "git commit -a") > > >> $ git add projects/www/index.php > > >> $ git status > > ---> # On branch master > > ---> # Changes to be committed: > > ---> # (use "git reset HEAD <file>..." to unstage) > > ---> # > > ---> # modified: projects/www/index.php > > ---> # > > >> $ cd 'data/git/sandbox/tmp/' > > >> $ git status > > ---> # On branch master > > ---> # Changes to be committed: > > ---> # (use "git reset HEAD <file>..." to unstage) > > ---> # > > ---> # modified: projects/www/index.php > > ---> # > > >> $ git commit -m "Testing to overcome remote origin problems." > > ---> [master da64db1] Testing to overcome remote origin problems. > > ---> 1 files changed, 3 insertions(+), 1 deletions(-) > > >> $ git remote rm origin > > ---> error: Could not remove config section 'remote.origin' > > >> $ git remote add origin ssh://roscoe@192.168.1.45/Volumes/Git/Remote/tmp > > >> $ git push origin master >> > > ---> Password: > > ---> fatal: protocol error: bad line length character: Call > > ---> fatal: The remote end hung up unexpectedly > > >> I could not figure out why now I had a new problem, but I reset the >> /Volumes/Git/Remote permissions on the server , tried it again, and life is >> now swell. You can see below that it worked... > > >> $ git push origin master > > ---> Password: > > ---> Counting objects: 15, done. > > ---> Delta compression using up to 2 threads. > > ---> Compressing objects: 100% (10/10), done. > > ---> Writing objects: 100% (15/15), 1.60 KiB, done. > > ---> Total 15 (delta 1), reused 0 (delta 0) > > ---> To ssh://roscoe@192.168.1.45/Volumes/Git/Remote/tmp > > ---> * [new branch] master -> master > > $ > > >
-- You received this message because you are subscribed to the Google Groups "Trac Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/W3zH-rUx9DEJ. To post to this group, send email to trac-users@googlegroups.com. To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.