为什么当我尝试使用 octokitnet 创建新文件时出现未找到错误?

Why i am getting a not found error when i try to create a new file with octokitnet?

我正在尝试做一个将 json 文件上传到我的 github 的应用程序,这个文件将用于了解用户在应用程序中做了什么。

但是我一直在创建文件,我有这个功能

public async void CrearCredenciales(string nombre, string clave)
        {
            cliente = new GitHubClient(new ProductHeaderValue(System.Diagnostics.Process.GetCurrentProcess().ProcessName));
            credenciales = new Credentials("token");
            var user = await this.cliente.User.Get("davidgmd");          
            var repositorio = cliente.Repository.Get("davidgmd", "Proyecto-de-fin-de-grado");

            // create file
            var createChangeSet = await cliente.Repository.Content.CreateFile(
                                            user.Login,
                                            "Proyecto-de-fin-de-grado",
                                            nombre + ".json",
                                            new CreateFileRequest("File creation",
                                                                  "Hello World!",
                                                                  "master"));

            var request = new SearchCodeRequest("Clave")
            {
                FileName = nombre + ".json"
            };
            var result = await this.cliente.Search.SearchCode(request);
            var cadena = user.Bio.ToString();
        }

当应用程序尝试执行时 "createChangeSet" 我得到一个异常 "Octokit.NotFoundException: 'Not Found'"

当我按下以获取更多详细信息时,显示 "Api:Error Message not found"。

我已经修改了token,用户是正确的,repo的名称也是正确的,token的设置是: enter image description here

并为用户全部标记 user 更新所有用户数据 read:user 读取所有用户配置文件数据 user:email 访问用户电子邮件地址(只读) user:follow 关注和取消关注用户

我终于明白哪里出了问题,我正在创建一个凭据,但该凭据尚未分配给客户端。

因此对于客户端是匿名且ofc无法创建文件的应用程序。

现在我将尝试将 json 本身作为消息,但我想这个问题已经完成了。