-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remote origin url is missing path separator in cloned repo #2337
Comments
I see the path is a local path. Could you provide an exact reproduction for a local path because there are many ways of quoting and 'sharing' paths (e.g. home drives as \share), and hence ways of them being mangled by different conversion processes |
The real problem is with the Git Gui which I was initially using since I
was new to Git. It fails every time and since you are navigating to the
path with a folder browser dialog it's all in the programming.
Since the Git Gui failed I have been working with Git Bash and have
narrowed it down. If you right click in a path and "copy address" it works
perfectly. This is because when it is pasted back into bash, the C:\ is
replaced with / and all the other \ are replaced with / so it takes the
form git clone /c/Users/SomeUser/Documents/GIT/REPOS/BARE
If you actually paste in a windows path
like C:\Users\SomeUser\Documents\GIT\REPOS\BARE it fails. This makes sense
now but then again it doesn't. If you are going to make a windows bash it
should probably take the same syntax as windows. On the other hand it is
bash so it is probably expecting unix like paths.
As I stated at first, Git Gui is what was throwing me off.
…On Fri, Sep 20, 2019 at 10:02 AM Philip Oakley ***@***.***> wrote:
I see the path is a local path.
Could you provide an exact reproduction for a local path because there are
many ways of quoting and 'sharing' paths (e.g. home drives as \share), and
hence ways of them being mangled by different conversion processes
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2337?email_source=notifications&email_token=ABQK7GUKB4XASO6FEYIHXTTQKSNSBA5CNFSM4IYOMOUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7GHCKQ#issuecomment-533492010>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQK7GWIJFJPBSNEASCPW5DQKSNSBANCNFSM4IYOMOUA>
.
|
Sorry, one more clarification.
In Git Bash path in these two forms work
C:/Users/SomeUser/Documents/GIT/REPOS/BARE
/c/Users/SomeUser/Documents/GIT/REPOS/BARE
But this one does not
C:\Users\SomeUser\Documents\GIT\REPOS\BARE
I guess it's all about the slashes.
I have not been able to get the Gui to clone a bare repo and it give me the
following error
fatal: couldn't find remote ref HEAD
fatal: the remote end hung up unexpectedly
…On Fri, Sep 20, 2019 at 10:02 AM Philip Oakley ***@***.***> wrote:
I see the path is a local path.
Could you provide an exact reproduction for a local path because there are
many ways of quoting and 'sharing' paths (e.g. home drives as \share), and
hence ways of them being mangled by different conversion processes
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2337?email_source=notifications&email_token=ABQK7GUKB4XASO6FEYIHXTTQKSNSBA5CNFSM4IYOMOUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7GHCKQ#issuecomment-533492010>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQK7GWIJFJPBSNEASCPW5DQKSNSBANCNFSM4IYOMOUA>
.
|
In Bash, backslash characters are escape characters. They have to be single-quoted, or escaped (by backslash characters, i.e. |
Closing this stale ticket. |
OS: Win 10 64 bit
Git version: 2.23.0
I can reproduce the issue by doing the following.
Create a bare repo
git --bare init
clone the repo
git clone somepathtobarerepo
open the config file on the cloned repo and notice that
[remote "origin"]
url = C:UsersEngineerDocumentsGITREPOSBARE
but it should be
[remote "origin"]
url = C:/Users/Engineer/Documents/GIT/REPOS/BARE
After making the correction everything works. This also shows up when doing it through the Git Gui.
The text was updated successfully, but these errors were encountered: