简体   繁体   English

Mathpix 入门授权

[英]Mathpix getting started authorization

I'm trying to work with Mathpix.我正在尝试使用 Mathpix。 On their docs it says to clone something from Git first.在他们的文档上,它说首先从 Git 克隆一些东西。 See their docs here: https://docs.mathpix.com/#introduction .在此处查看他们的文档: https://docs.mathpix.com/#introduction When I try to clone through Git Bash typing git clone git@github.com:Mathpix/api-examples.git as the instructions say, I get the following response: When I try to clone through Git Bash typing git clone git@github.com:Mathpix/api-examples.git as the instructions say, I get the following response:

Cloning into 'api-examples'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

Well, where can I put my API keys on Git Bash?那么,我在哪里可以将我的 API 密钥放在 Git Bash 上? The instructions say that the keys are placed in the following format:说明说密钥按以下格式放置:

The request headers must be set as follows:请求标头必须设置如下:

 { "content-type": "application/json", "app_id": "YOUR_APP_ID", "app_key": "YOUR_APP_KEY" }

And this is through HTTP Basic Auth according to them.根据他们的说法,这是通过 HTTP 基本身份验证。

So, as far as I see it, I can't put my keys on Git Bash when I clone because the keys are in JSON format, but then I can't clone and I'm stuck in the first step.所以,据我所见,当我克隆时,我无法将我的密钥放在 Git Bash 上,因为密钥是 JSON 格式,但第一步我不能。

Firstly, the authorization is for the requests to the API.首先,授权是针对 API 的请求。 You will need this header then.然后你将需要这个 header。 To clone, I used:为了克隆,我使用了:

git clone https://github.com/Mathpix/api-examples.git

This cloned the API Examples and you can then change directories using cd api-examples/images .这克隆了 API 示例,然后您可以使用cd api-examples/images更改目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM