-
Notifications
You must be signed in to change notification settings - Fork 165
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
invalid character "\\" in host name #82
Comments
Hey, thanks for writing in, and sorry to hear you're having trouble. In general, Git LFS doesn't deal well with local backslash paths when pushing. You're seeing this issue because we try to parse the URL given to acquire credentials, and the unescaped backslashes make it look like you have a corrupt URL. You'll probably have more success if you use a file:// URL, perhaps formatted like so: |
A bit more info. As recommended in issue no. 81 I also set GIT_TRACE GIT_TRANSER_TRACE and GIT_CURL_VERBOSE then pushed with git push origin master. Everything looks okay until: 17:43:56.738978 trace git-lfs: tq: sending batch of size 1 |
@bk2204 Thanks for quick turnaround. I'll give our suggestion a shot. |
@bk2204 OK I git clone ///c/users/administrator/desktop/GITOUT/GITREPO into GITCLONE and this created the link that you are talking about. I no longer get the message saying there is in an invalid character when pushing. However, when I try to git push origin master the system gets stuck and only says: It does not prompt for credentials. When I look at the server it return status 401, which makes sense because I think what this is telling me is that the test server never receives authenticated username and password. With GIT_TRACE GIT_TRANSFER and GIT_CURL_VERBOSE set. I get a continuous run of status 401. I can see that git lfs is trying to upload to the server, but fails. So closer now, but I'm not getting instruction to type username or password. |
Can you post the output of the operation with those three environment variables set? |
@bk2204, I've gotten it to work on the Windows 8 computer at home. For the Windows 7 computer at work I had to include the computer admin name and password. It did push though. I never did get a pop-up for username and password. I'll be posting the output produced when just testuser and testpass were listed under the /mgmt./users .css soon as I get it cleared by IT. Thanks for your help. |
Here is the output for the Windows 7 computer at work when I git push origin master. The first time the test server returns a status 401 I shut it down. If I don't do that git tries to push the blob to localhost:8080 repeatedly. C:\Users\Administrator\Desktop\GITOUT\GITCLONE\gitrepo>set GIT_TRACE=1 C:\Users\Administrator\Desktop\GITOUT\GITCLONE\gitrepo>set GIT_TRANSFER=1 C:\Users\Administrator\Desktop\GITOUT\GITCLONE\gitrepo>set GIT_CURL_VERBOSE=1 C:\Users\Administrator\Desktop\GITOUT\GITCLONE\gitrepo>git push origin master
{"operation":"upload","objects":[{"oid":"ec4bfdfea443c79957855dac8979004369b776bce38297333dc4fa30b1b0758d","size":1088990}],"ref":{"name":"refs/heads/master"}}13:21:48.178826 trace git-lfs: < HTTP/1.1 401 Unauthorized
13:21:58.515247 trace git-lfs: api error: Post http://localhost:8080/objects/batch: dial tcp 127.0.0.1:8080: connectex: No connection could be made because the target machine actively refuse C:\Users\Administrator\Desktop\GITOUT\GITCLONE\gitrepo> |
It looks like the credential manager you're using is providing a username and password each time even though it's been told that the ones it provided aren't valid. Since it looks like you're using the Microsoft Git Credential Manager for Windows, this might be microsoft/Git-Credential-Manager-for-Windows#703. You could try reaching out in that issue to see if they can help, or if you can access the credential manager storage, you could try to delete the entry directly. I'm not sure how to do that, since I'm not using Windows or that credential manager. Alternately, you could try using a different credential manager, such as |
I'm having some trouble getting blobs to push into lfs-test-server. I've tried to construct a standalone setup on two different machines: a home laptop using Windows 8 and a (airgapped) work laptop using Windows 7. Results were the same for both.
As instructed in the lfs-test-server installation instructions, I in lfs-test-server setup I changed the environmental variables LFS_AdminUser (test) and LFS_AdminPass (testpass) in order to open \mgmt and add a user (testuser) and password (testpass). The only way I could figure out how to do this was using advanced properties in windows control panel and adding through the advanced system properties in the windows control panel. I can open mgmt template when I type http://localhost:8080/mgmt
All other environmental variables were left at default.
Here is my setup
a) .git\ config file content is as follows:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
b) .lfsconfig file (staged and committed) as follows:
[lfs]
url = "http://localhost:8080"
Note: I also tried url =http://localhost:8080/ and results were the same (explained at end of message).
c) .gitattributes file (staged and committed) as follows:
*.pdf filter=lfs diff=lfs merge=lfs -text
d) LFS Environment on GITREPO is:
Endpoint=http://localhost:8080 (auth=none)
LocalWorkingDir=C:\Users\Dad\Desktop\GITOUT\GITREPO
LocalGitDir=C:\Users\Dad\Desktop\GITOUT\GITREPO.git
LocalGitStorageDir=C:\Users\Dad\Desktop\GITOUT\GITREPO.git\lfs\objects
LocalReferenceDirs=
TempDir=C:\Users\Dad\Desktop\GITOUT\GITREPO.git\lfs\tmp
ConcurrentTransfers=3
TusTransfers=false
BasicTransfersOnly=false
SkipDown loadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=C:\Users\Dad\Desktop\GITOUT\GITREPO.git\lfs
AccessDownload=none
AccessUpload=none
DownloadTransfers=basic
UploadTransfers=basic
GIT_EXEC_PATH=C:/Program Files/Git/mingw64/libexec/git-core
git config filter.lfs.process = "git-lfs filter-process"
git config filter.lfs.smudge = "git-lfs smudge -- %f"
git config filter.lfs.clean = "git-lfs clean -- %f"
a) .git\ config file content is as follows:
[core]
bare = false
repositoryformatversion = 0
filemode = false
symlinks = false
ignorecase = true
logallrefupdates = true
[remote "origin"]
url = C:\Users\Dad\Desktop\GITOUT\GITREPO
fetch = +refs/heads/:refs/remotes/origin/
[branch "master"]
remote = origin
merge = refs/heads/master
[lfs "http://localhost:8080"]
locksverify = false
access = basic
b) .lfsconfig (unchanged) as follows:
[lfs]
url = "http://localhost:8080"
c) .gitattributes file (unchanged) as follows:
*.pdf filter=lfs diff=lfs merge=lfs -text
e) LFS Environment on GITCLONE is:
Endpoint=http://localhost:8080 (auth=none)
LocalWorkingDir=C:\Users\Dad\Desktop\GITOUT\GITCLONE
LocalGitDir=C:\Users\Dad\Desktop\GITOUT\GITCLONE.git
LocalGitStorageDir=C:\Users\Dad\Desktop\GITOUT\GITCLONE.git\lfs\objects
LocalReferenceDirs=
TempDir=C:\Users\Dad\Desktop\GITOUT\GITCLONE.git\lfs\tmp
ConcurrentTransfers=3
TusTransfers=false
BasicTransfersOnly=false
SkipDown loadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=C:\Users\Dad\Desktop\GITOUT\GITCLONE.git\lfs
AccessDownload=none
AccessUpload=none
DownloadTransfers=basic
UploadTransfers=basic
GIT_EXEC_PATH=C:/Program Files/Git/mingw64/libexec/git-core
git config filter.lfs.process = "git-lfs filter-process"
git config filter.lfs.smudge = "git-lfs smudge -- %f"
git config filter.lfs.clean = "git-lfs clean -- %f"
I am able to push files that I don’t track from GITCLONE to GITREPO no problem. However, when I attempt to push the .pdf file from the clone to the repository I’m expecting the repository to have the SHA-1 pointer, and localhost:8080 to show the .pdf object in the \objects screen.
However, I am not asked for my credentials and I instead get the following message:
Uploading LFS objects: 0% (0/1), 0 B | 0 B/s, done
batch response: creds: parse //c:\users\administrator\desktop\GITOUT\GITREPO: invalid character “\” in host name
error: failed to push some refs to ‘c:\users\administrator\desktop\GITOUT\GITREPO’.
GITCLONE doesn’t push to GITREPO. I don’t even get the SHA-1 pointer in the GITREPO. I'm pretty sure that my lfs-test-server setup is incorrect. Is my problem that I set environmental variables for LFS_AdminUser and LFS_AdminPass within the advanced settings of windows? If so how do I set these without using windows? Should I change to https:?
I’m totally stumped.
The text was updated successfully, but these errors were encountered: