From: Fred's Personal <freddiewik@optonline.net>
To: git@vger.kernel.org
Subject: Trouble Cloning Git remote repository
Date: Fri, 26 Feb 2016 18:03:37 -0500 [thread overview]
Message-ID: <009f01d170e9$ecd5cae0$c68160a0$@optonline.net> (raw)
I am trying to set up a remote Git repository on my network server.
I want to develop source on several desktops / laptops and want to have a
central repository to sync everything and maintain version control.
Seems like a good fit for Git, but I cannot get it to work and would
appreciate advice on fixing the configuration or how to troubleshoot to
identify the root cause.
Please let me know what additional info you need to assist.
I have listed the machine configurations and the Git Bash lines from
attempting the git clone.
Configuration:
Local Machine (Host1)
o Windows 10 - Git for Windows 2.7.1.2-64bit update
o Git Repository = ~HOME/gitrepository
Remote Machine (Host2)
o Ubuntu Server 14.04 LTS; Git version 2.7.2
o Git repository = /srv/centralrepo.git ;created with -bare -shared
o Owner= user1; group= developer
o Created ~/.bashrc to ensure PATH is set correctly with 'interactive
non-login' session
o After .bashrc runs there is a line from a bash script that causes a
bash error: "bash: user1@Host2: command not found"
Clone to the remote repository always fails with:
bash: user1@Host2: command not found
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
All command line text shown here is executed from Local Machine(Host1) (from
Windows Git Bash) My comments preceded with ##
## First cd into local repository and check status;
user1@Host1 MINGW64 ~
$ cd $HOME/gitrepository
user1@Host1 MINGW64 ~/gitrepository (master)
$ git status
On branch master
nothing to commit, working directory clean
## Now try to clone remote repository on Host2 (added set -x to ~/.bashrc
script)
user1@Host1 MINGW64 ~/gitrepository (master)
$ git clone -v ssh://user1@Host2/srv/centralrepo
Cloning into 'centralrepo'...
>>>Lines from $HOME/.bashrc
+ export
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
:/usr/local/games
+
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
:/usr/local/games
+ PROMPT_COMMAND=
+ CDPATH=
+ '[' '' = yes ']'
+ PS1='${debian_chroot:+($debian_chroot)}\u:\W\$ '
+ export GIT_TRACE_PACKET=1
+ GIT_TRACE_PACKET=1
+ export GIT_TRACE=1
+ GIT_TRACE=1
>>>End of Lines from $HOME/.bashrc
## WHERE DOES The following line COME FROM????What Script spits out this
line????
+ user1@Host2 git-upload-pack /srv/centralrepo
bash: user1@Host2: command not found
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
## Check remote path for interactive non-login session
user1@Host1 MINGW64 ~/gitrepository (master)
$ ssh user1@Host2 echo \$PATH
Enter passphrase for key '/c/Users/user1/.ssh/id_rsa':
## >>>Lines from $HOME/.bashrc (See Above, removed here for clarity)
## PATH looks okay
+ echo
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr
/local/games
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr
/local/games
## List remote Git respository to check permissions
user1@Host1 MINGW64 ~/gitrepository (master)
$ ssh user1@Host2 ls -al /srv/centralrepo.git
Enter passphrase for key '/c/Users/user1/.ssh/id_rsa':
## >>>Lines from $HOME/.bashrc (See Above, removed here for clarity)
## CHECK the permissions and owner of the remote git repository
+ ls -al /srv/centralrepo.git
total 44
drwxrwsrwx 7 user1 developer 4096 Feb 11 21:02 .
drwxrwxrwx 4 user1 developer 4096 Feb 2 08:15 ..
drwxrwsrwx 2 user1 developer 4096 Feb 2 08:16 branches
-rwxrwxrwx 1 user1 developer 224 Feb 4 18:09 config
-rwxrwxrwx 1 user1 developer 26 Feb 11 21:02 description
-rwxrwxrwx 1 user1 developer 23 Feb 2 08:16 HEAD
drwxrwsrwx 2 user1 developer 4096 Feb 2 08:16 hooks
drwxrwsrwx 2 user1 developer 4096 Feb 2 08:16 info
drwxrwsrwx 4 user1 developer 4096 Feb 2 08:16 objects
drwxrwsrwx 4 user1 developer 4096 Feb 2 08:16 refs
-rw-rw-r-- 1 user1 developer 52 Feb 11 19:37 sample.txt
## Try cloning with -u option and path to upload-pack
user1@Host1 MINGW64 ~/gitrepository (master)
$ git clone -u /usr/bin/git-upload-pack ssh://user1@Host2/srv/centralrepo
Cloning into 'centralrepo'...
## >>>Lines from $HOME/.bashrc (See Above, removed here for clarity)
## ***** POSIX directory translation messed up this path
+ user1@Host2 C:/Program Files/Git/usr/bin/git-upload-pack /srv/centralrepo
bash: user1@Host2: command not found
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
## List the remote repository config
user1@Host1 MINGW64 ~/gitrepository (master)
$ ssh user1@Host2 cat /srv/centralrepo.git/config
Enter passphrase for key '/c/Users/user1/.ssh/id_rsa':
## >>>Lines from $HOME/.bashrc (See Above, removed here for clarity)
+ cat /srv/centralrepo.git/config
[core]
repositoryformatversion = 0
filemode = true
bare = true
sharedrepository = 1
[receive]
denyNonFastforwards = true
[remote "origin"]
uploadpack = /usr/bin/git-upload-pack
receivepack = /usr/bin/git-receive-pack
## List Git version
user1@Host1 MINGW64 ~/gitrepository (master)
$ ssh user1@Host2 git --version
Enter passphrase for key '/c/Users/phreddyw/.ssh/id_rsa':
## >>>Lines from $HOME/.bashrc (See Above, removed here for clarity)
+ git --version
trace: built-in: git 'version'
git version 2.7.2
Regards,
Fred
next reply other threads:[~2016-02-26 23:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 23:03 Fred's Personal [this message]
2016-02-27 9:35 ` Trouble Cloning Git remote repository Duy Nguyen
2016-02-28 17:48 ` Fred's Personal
2016-02-29 1:20 ` Duy Nguyen
2016-02-29 9:34 ` John Keeping
2016-03-01 15:04 ` Fred's Personal
2016-03-01 15:28 ` 'John Keeping'
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='009f01d170e9$ecd5cae0$c68160a0$@optonline.net' \
--to=freddiewik@optonline.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).