Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从GitHub私有repo嵌入图像_Github - Fatal编程技术网

从GitHub私有repo嵌入图像

从GitHub私有repo嵌入图像,github,Github,我在GitHub有一个私人回购协议,在那里我保存了一些截图 https://github.com/erikmartinjordan/Screenshots 要将此回购协议的图片嵌入到外部降价文件中,我复制完整的图片地址(右键单击图片): ![私人图片](https://github.com/erikmartinjordan/Screenshots/blob/master/Screenshot.png?raw=true) 问题是,图片不会显示在浏览器中(仅当我登录GitHub时)。有没有一种简单的

我在GitHub有一个私人回购协议,在那里我保存了一些截图

https://github.com/erikmartinjordan/Screenshots

要将此回购协议的图片嵌入到外部降价文件中,我复制完整的图片地址(右键单击图片):

![私人图片](https://github.com/erikmartinjordan/Screenshots/blob/master/Screenshot.png?raw=true)


问题是,图片不会显示在浏览器中(仅当我登录GitHub时)。有没有一种简单的方法可以显示外部GitHub私有repo的图片而不使用GitHub API?

要显示来自repo的图像,可以使用
raw.githubusercontent.com

因此,对于回购协议中的图像,您需要使用降价作为

![Private picture](https://raw.githubusercontent.com/erikmartinjordan/Screenshots/master/Screenshot%202020-09-15%20at%2010.32.38.png)
在此处使用相同的标记:

如果映像是私有GitHub repo的一部分,则如果不使用您生成的访问令牌(可在登录时生成),则无法访问GitHub外部的映像。然后,您需要将令牌用作

![Private picture](https://raw.githubusercontent.com/erikmartinjordan/Screenshots/master/Screenshot%202020-09-15%20at%2010.32.38.png?token=xxxxxxxx)
但请确保不要公开令牌