You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support URL including username and password as rfc1738 defined #202
3.1. Common Internet Scheme Syntax
While the syntax for the rest of the URL may vary depending on the
particular scheme selected, URL schemes that involve the direct use
of an IP-based protocol to a specified host on the Internet use a
common syntax for the scheme-specific data:
//<user>:<password>@<host>:<port>/<url-path>
Some or all of the parts "<user>:<password>@", ":<password>",
":<port>", and "/<url-path>" may be excluded. The scheme specific
data start with a double slash "//" to indicate that it complies with
the common Internet scheme syntax. The different components obey the
following rules:
user
An optional user name. Some schemes (e.g., ftp) allow the
specification of a user name.
password
An optional password. If present, it follows the user
name separated from it by a colon.
The user name (and password), if present, are followed by a
commercial at-sign "@". Within the user and password field, any ":",
"@", or "/" must be encoded.
I'm a little iffy on this. In order to set the lfs url per repo, it has to be set in the repo's .gitconfig file. If the credentials are encoded in the URL then not only will the credentials be checked into the repository, but everyone would have to have the same credentials. While it's technically possible, I fear that it would be promoting some bad practices if we support it.
It is possible to set it there, with the caveat that the lfs endpoint configuration doesn't travel with the repository (ie everyone will need to set it up manually).
We could perhaps support using user:pass in the url as long as it doesn't come out of the checked in .gitconfig, or perhaps give a warning if it does. I'd definitely want to be careful how we document things. What are your thoughts on those?
I think it's a part of RFC's URL standard, I hope git-lfs can support it, though there may be potential issue, but it's depends on users, we can use it wisely.
👍 on giving a warning. I'd hope that anyone that would put their password would understand the ramifications, but you never know. I'd hate for someone to put an important password in there because they can't get git-credential set up or something.
I would very much like to see support for user:pass@ added. This would make it easy for me to make my git-lfs backed repo public (i.e. the user needs to enter no password to clone it), something I'm trying to do now (without success).
Is there currently any other way to make a lfs-test-server backed repo public/passwordless so that cloning "just works" when the user only knows the repo's URL?
Activity
tclem commentedon Apr 9, 2015
Cheers for the report @PeterDaveHello!
I'm concerned about security and storing passwords in config files, but agree with your point about sticking to the URL spec.
PeterDaveHello commentedon Apr 9, 2015
Yeah, I'm sure that I can use it with native git client to set the remote, so git-lts can be so 👍
rubyist commentedon Apr 9, 2015
I'm a little iffy on this. In order to set the lfs url per repo, it has to be set in the repo's
.gitconfigfile. If the credentials are encoded in the URL then not only will the credentials be checked into the repository, but everyone would have to have the same credentials. While it's technically possible, I fear that it would be promoting some bad practices if we support it.PeterDaveHello commentedon Apr 9, 2015
What about in
.git/config? I think it'll be no problem?rubyist commentedon Apr 9, 2015
It is possible to set it there, with the caveat that the lfs endpoint configuration doesn't travel with the repository (ie everyone will need to set it up manually).
We could perhaps support using user:pass in the url as long as it doesn't come out of the checked in .gitconfig, or perhaps give a warning if it does. I'd definitely want to be careful how we document things. What are your thoughts on those?
PeterDaveHello commentedon Apr 9, 2015
I think it's a part of RFC's URL standard, I hope git-lfs can support it, though there may be potential issue, but it's depends on users, we can use it wisely.
technoweenie commentedon Apr 9, 2015
👍 on giving a warning. I'd hope that anyone that would put their password would understand the ramifications, but you never know. I'd hate for someone to put an important password in there because they can't get
git-credentialset up or something.l3iggs commentedon May 28, 2015
I would very much like to see support for
user:pass@added. This would make it easy for me to make my git-lfs backed repo public (i.e. the user needs to enter no password to clone it), something I'm trying to do now (without success).Is there currently any other way to make a lfs-test-server backed repo public/passwordless so that cloning "just works" when the user only knows the repo's URL?
technoweenie commentedon Aug 11, 2016
Fixed all the way back in v0.5.2.