aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers
diff options
context:
space:
mode:
authorKevin Quick <kquick@galois.com>2020-09-25 08:09:56 -0700
committerKevin Quick <kquick@galois.com>2020-09-25 08:09:56 -0700
commit5a35cc29bffc88b88f883dfcdd1bb251eab53ecd (patch)
tree8061fea78f97713b539cedf640e638cf7870a65c /src/libfetchers
parentef2a14be190f7162e85e9bdd44dd45bd9ddfe391 (diff)
Re-add support for github-access-token, but mark as deprecated.
Diffstat (limited to 'src/libfetchers')
-rw-r--r--src/libfetchers/github.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libfetchers/github.cc b/src/libfetchers/github.cc
index 0e0655367..443644639 100644
--- a/src/libfetchers/github.cc
+++ b/src/libfetchers/github.cc
@@ -146,7 +146,17 @@ struct GitArchiveInputScheme : InputScheme
auto tokens = settings.accessTokens.get();
auto pat = tokens.find(host);
if (pat == tokens.end())
+ {
+ if ("github.com" == host)
+ {
+ auto oldcfg = settings.githubAccessToken.get();
+ if (!oldcfg.empty()) {
+ warn("using deprecated 'github-access-token' config value; please use 'access-tokens' instead");
+ return oldcfg;
+ }
+ }
return std::nullopt;
+ }
return pat->second;
}