@wxy
https://linux.cn/article-16424-1.html
This commit is contained in:
Xingyu Wang 2023-11-29 08:30:17 +08:00
parent 0f2ffab412
commit f90aba0261
2 changed files with 96 additions and 93 deletions

View File

@ -0,0 +1,96 @@
[#]: subject: "Microsoft is Locking Down Search for Public Code on GitHub"
[#]: via: "https://news.itsfoss.com/microsoft-github-open-source-code/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972/lctt-scripts-1700446145"
[#]: translator: "ChatGPT"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-16424-1.html"
微软限制了对 GitHub 上的公开代码的搜索
======
![][0]
> 微软,你在 GitHub 上的行为究竟是何目的?
许多用户对 [微软收购 GitHub][1] 这一事实感到失望。当然,这并非用户能阻止的事情。
因此,有些人选择转向 GitLab 或其他 [GitHub 替代品][2],而部分人则决定坚守在 GitHub不论他们的感受如何。
GitHub 是无数开发者熟悉的地方。无论现在是谁拥有它,这个平台都有它的价值,所以用户仍然根据自己的需求来选择使用它。
不幸的是,自微软加入之后,平台上才有了某些变化,两者之间似乎存在一些关联,而且部分改变让用户觉得不便。被关注起来的这个变化就是 2023 年 6 月实施的。
### 现在需要登录才能搜索代码
一位 GitHub 用户/贡献者 [抱怨][3] 在未登录的情况下无法在公开仓库中搜索代码,这让人非常失望。
> 📋 在 GitHub 上进行全局代码搜索已经需要登录用户操作,这样已经好几年了。现在所讨论的是仓库内搜索的情况。
下面是他的观点:
> 这真是让人感到恶心,这是对开源运动的亵渎。我必须指出,微软在这里是在滥用开源运动。
>
> 我们被告知这是出于安全考虑……但当我可以简单地克隆仓库,使用更专业的工具进行适当的搜索和分析时,那么这样的安全又是为了什么呢?
>
> 那么到底是什么原因呢?!你们还没有获得我们足够的数据吗?只是靠每次上厕所就能赚点钱,你们还要追踪我在看哪一行代码?
此外,他解释了在他认为应公开访问的仓库中搜索代码的不便。
> 我正在老旧的机器上使用,需要在我们自己的仓库中搜索东西,结果却做不到。我其实希望人们能够搜索我们的代码库。
>
> 那我该怎么做呢?我试过登录。但是我的密码管理器不在我手边,所以我不得不拿出我的手机。哦!现在我需要 2FA。然后我得回办公室拿我的 Yubi 密钥。旧的笔记本没有 USB-C 端口?好吧,现在我无能为力了。
>
> 这个变化不仅没必要,而且对你们自己的客户来说,简直是**敌意**。猖獗的敌意!
实际上,无法访问本应公开且对“**所有人**”开放的代码库让人极度不便。
这就是开源代码应该如何访问的,对吗?
Martin Woodward**GitHub 的开发者关系副总裁**,对这个反馈简单地表示,这是一段时间以来的一个改变,主要是为了避免机器人。
> 对 [@koepnick][4] 的不便感到抱歉,虽然在很长一段时间里,我们在全仓库范围内的搜索都要求用户登录,但是当我们在 2023 年提升了搜索能力后,我们不得不将这一要求扩大到仓库内(参看 [https://github.blog/changelog/2023-06-07-code-search-now-requires-login/][5])。
>
> 主要是确保我们的服务器能够支撑 GitHub 上的开发者负载,并帮助防止服务器被匿名请求等机器人行为压垮。
当然,这是一个大公司的预期回应。不幸的是,这并没有说服为什么要在 GitHub 上做出这样的改变,而其他平台并没有这个限制。
声明说的更多的是“何时实施了此项更改”。
幸运的是,[代码搜索团队的一员][6] 试图阐述他们通过限制获得的优势。
**太长不看版:该策略可以减少滥用,但并不能阻止所有的机器人。**
那么,让我们思考一下,作为科技行业的重要参与者,微软没有足够的基础设施来抵御机器人,而不是通过限制访问代码来做到这一点吗?难道没有其他方式来保护代码免受机器人和其他恶意抓取器的侵袭,而不需要禁用搜索功能吗?
此外,讨论中的一些用户指出,开源代码的全部意义就在于任何人,无论身份是已知还是未知,都应该可以访问。
尽管代码关联到了开源许可证,但是这个限制似乎违反了开源的概念。
_微软是正在私下里试图控制 GitHub 上的开源利益吗_ 🤔
💬 也许微软需要重新考虑这个变动,来让事情变得好一些?或者,也许他们可以提供一个比声明中更好的解释?
*题图MJ/d35ceb65-521d-4313-8e4c-60df0a898455*
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/microsoft-github-open-source-code/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[ChatGPT](https://linux.cn/lctt/ChatGPT)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/microsoft-github/
[2]: https://itsfoss.com/github-alternatives/
[3]: https://github.com/orgs/community/discussions/77046
[4]: https://github.com/koepnick
[5]: https://github.blog/changelog/2023-06-07-code-search-now-requires-login/
[6]: https://github.com/orgs/community/discussions/77046#discussioncomment-7683240
[0]: https://img.linux.net.cn/data/attachment/album/202311/29/082734mnmvpphzuz4pojjx.png

View File

@ -1,93 +0,0 @@
[#]: subject: "Microsoft is Locking Down Search for Public Code on GitHub"
[#]: via: "https://news.itsfoss.com/microsoft-github-open-source-code/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lujun9972/lctt-scripts-1700446145"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Microsoft is Locking Down Search for Public Code on GitHub
======
Microsoft, what are you up to with GitHub?
Many users were disappointed to realize [Microsoft acquired GitHub][1]. Of course, it was nothing something users could prevent.
So, some decided to move to GitLab or other [GitHub alternatives][2], while some decided to stay irrespective of how they felt.
GitHub is a familiar place for countless developers. No matter who owns it now, the platform has its benefits, which is why users still choose to use it as per their requirements.
Unfortunately, there have been certain changes to the platform only after Microsoft came to the scene, and some of them have been inconvenient. One of those changes (made back in June 2023) has come to the spotlight with a new discussion over it.
### Code Search Now Requires Log-in
A GitHub user/contributor [complained][3] that it is extremely disappointing to not being able to search for code in a public repository without logging in.
📋
Global code search across GitHub has been restricted to logged-in users for years now. This situation is regarding the in-repository search.
Here's what he had to say:
> This is revolting and an anathema to the open source movement. A movement, I might add, Microsoft is abusing here.
>
> We're told that this is for security... But what _possible_ point is there when I can simply clone the repository and use more dedicated tools for proper searching and analysis?
>
> So what possible reason is there?! Do you NOT have enough of our data? Is it not enough to monetize every bowel movement, you now feel the need to track which individual lines of code I'm browsing?
Furthermore, he explained the inconvenience of logging in to search code in his repository, which he wants accessible to the public without any hassle.
> I was on an older machine and needed to search for something in OUR OWN REPOSITORY and couldn't. I actually want people to be able to search our codebase.
>
> So what did I have to do? I tried logging in. Didn't have my password manager nearby. So I had to grab my phone. Oh! Now I need to 2FA. So back to my office to grab my Yubi key. The old laptop doesn't have USB-C ports? Well now I'm SOL.
>
> Not only is this change unncecessary, it's downright **hostile** towards your own customers. _Ambitiously_ hostile!
It is practically a big inconvenience to access a code repository that is supposed to be public and accessible to " **everyone** ".
That is how open-source code should be accessible, right?
Martin Woodward, the **VP of Developer Relations at GitHub** responded to the feedback by simply stating that this has been a change for a while, primarily to keep bots at bay.
> Sorry for the inconvenience [@koepnick][4] \- while searching across all repos has required being logged in for a long time, when we enhanced the search capabilities earlier in the 2023 we had to extend this to repos as well (see [https://github.blog/changelog/2023-06-07-code-search-now-requires-login/][5]).
>
> This is primarily to ensure we can support the load for developers on GitHub and help protect the servers from being overwhelmed by anonymous requests from bots etc.
Sure, that is an expected response from a big company. Unfortunately, it does not sound convincing as to why is that a change to GitHub while other platforms do not have this restriction in place.
The statement says more about "when this change was implemented".
Fortunately, [a member of the Code Search team][6] tried to chip in with the advantages they get with the restriction.
**TLDR: _It lets them reduce the abuse, but still does not stop all the bots._**
So, that makes us think, Microsoft, being a major player in the tech industry, does not have a capable infrastructure to ward off bots without restricting access to the code? Is there no other way to protect the code from bots and other malicious scrapers without disabling the search functionality?
Moreover, some users in the discussion pointed out that the whole point of open-source code is the intent of everyone accessing it, whether the identity is known or unknown.
Despite the open-source license associated with the code, the restriction makes it go against the concept of open-source.
_Is Microsoft secretly trying to chain the benefits of open-source on GitHub?_ 🤔
💬 _Maybe Microsoft needs to re-consider this change for the better? Or, perhaps come up with a better explanation than what the statement says?_
* * *
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/microsoft-github-open-source-code/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/microsoft-github/
[2]: https://itsfoss.com/github-alternatives/
[3]: https://github.com/orgs/community/discussions/77046
[4]: https://github.com/koepnick
[5]: https://github.blog/changelog/2023-06-07-code-search-now-requires-login/
[6]: https://github.com/orgs/community/discussions/77046#discussioncomment-7683240