问题描述
我希望能够下载xml文件的最新版本,该文件包含我的github存储库中存在的数据.但是,当我提交文件的新版本时,文件末尾的令牌会更改.
I want to be able to download the latest version of an xml file containing data that exists in my github repository. However, the token at the end of the file changes when I commit a new version of the file.
有没有办法防止令牌更改或以某种方式找出令牌的含义?
Is there a way to prevent the token from changing or somehow find out what it is programmatically?
我需要一个可以访问的永久链接...
I need a permanent link I can access...
推荐答案
URL中的令牌与文件无关,它是身份验证令牌,需要从私有存储库下载原始文件.提交新文件时,它不会更改,当Oauth会话过期并再次登录时,它也会更改.要获得不变的密码,只需制作一个个人访问令牌( https://github.com/settings/令牌),然后将其替换为网址中的令牌.
The token in the URL has nothing to do with the file, it's an authentication token that is needed to download the raw file from a private repo. It doesn't change when you commit a new file, it changes when your Oauth session expires and you login again. To get one that doesn't change, just make a Personal Access Token (https://github.com/settings/tokens) and replace the token in the URL with that.
这篇关于Github原始文件-我可以获得永久链接吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!