小编Nic*_*ion的帖子

二级索引的“提供的关键元素与架构不匹配”

我有一个描述的 DynamoDB 表(用户应该可以通过唯一的 user_id 或用户名 + system_id 的组合来选择):

"TableName": "auth-users",
"KeySchema": [ {
        "KeyType": "HASH", 
        "AttributeName": "user_id"
    }
], 
"AttributeDefinitions": [ {
    {
        "AttributeName": "user_id", 
        "AttributeType": "S"
    },
        "AttributeName": "system_id", 
        "AttributeType": "S"
    },  {
        "AttributeName": "username", 
        "AttributeType": "S"
    }
], 
"GlobalSecondaryIndexes": [
    {
        "IndexName": "username-system_id-index", 
        "Projection": {
            "ProjectionType": "ALL"
        }, 
        "IndexStatus": "ACTIVE", 
        "KeySchema": [ {
               "KeyType": "HASH", 
               "AttributeName": "username"
            }, {
               "KeyType": "RANGE", 
               "AttributeName": "system_id"
            }
        ]
    }
],
... 
Run Code Online (Sandbox Code Playgroud)

当我使用主键运行以下代码时,我得到了一个记录列表,正如预期的那样:

var AWS = require('aws-sdk');
var dynamodb = new AWS.DynamoDB({region: …
Run Code Online (Sandbox Code Playgroud)

amazon-web-services node.js amazon-dynamodb

4
推荐指数
1
解决办法
2914
查看次数

GitLab HTTP URL 上的 504 网关超时

我已经在 Linux 机器上安装了 GitLab 6.0 并创建了许多项目。我可以使用 SSH URL 创建每个项目的本地克隆,但是当我尝试使用 HTTP URL 时,我会在几秒钟内收到 504 Gateway Timeout

  • 当我将 HTTP URL 粘贴到 SourceTree 中时,它会显示“正在检查源”一秒钟左右,然后“这不是有效的源路径/URL”。当我点击“详细信息...”时,它显示:
访问 http://myserver/group/project.git/info/refs 时,请求的 URL 返回错误:504
  • Git Gui 还尝试访问 http://myserver/group/project.git/info/refs URL 并收到 504 错误。

  • 当我尝试在浏览器中打开此“info/refs”URL 时,会出现“需要身份验证”弹出窗口,该弹出窗口**不接受**我的 GitLab 用户名/密码或电子邮件/密码。

  • Eclise EGit 插件具有提供用户名和密码的字段 - 如果我填写这些字段,那么我会得到一个分支列表,但随后我会在克隆操作中收到“读取超时”消息(存储库为 2GB)。这种方法确实适用于我的 GitLab 服务器上的小型项目。

根据说明,我使用了 nginx,但它似乎是我遇到的许多问题的根源。

sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production:

System information
System:         Ubuntu 12.04
Current User:   git
Using RVM:      yes
RVM Version:    1.6.9
Ruby Version: …
Run Code Online (Sandbox Code Playgroud)

git nginx git-gui gitlab atlassian-sourcetree

3
推荐指数
1
解决办法
2万
查看次数

用于部署谷歌云功能的服务帐户角色

我正在尝试使用gcloud beta functions deploy服务帐户从 CI 使用,但出现错误:

(gcloud.beta.functions.deploy) ResponseError: status=[403], code=[Forbidden], message=[调用者没有权限]

我在 IAM Web 控制台中找不到任何看起来合适的角色。我使用哪一种?

service-accounts gcloud google-cloud-functions

3
推荐指数
3
解决办法
3409
查看次数

在 Github 操作中 mvn deploy 给出 401 Unauthorized

我曾多次尝试将工件部署到https://maven.pkg.github.com.github/workflows但它们都导致 401 Unauthorized 错误。

      - name: Setup java for mvn deploy
        uses: actions/setup-java@v1
        with:
          java-version: 8

      - name: Deploy kaldi-linux.zip
        working-directory: kaldi
        env:
          GITHUB_TOKEN: ${{ github.token }}
        run: |
          cp ../.github/kaldi/* .
          perl -pi -e 's/^(\s{4}<version>).*(<\/version>)/${1}$ENV{"KALDI_VERSION"}${2}/g' pom.xml
          mvn deploy
Run Code Online (Sandbox Code Playgroud)
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy)
 on project kaldi: Failed to deploy artifacts: Could not transfer artifact org.kaldi:kaldi:pom:da93074
 from/to temp (https://maven.pkg.github.com/nalbion/vosk-api): Transfer failed for 
https://maven.pkg.github.com/nalbion/vosk-api/org/kaldi/kaldi/da93074/kaldi-da93074.pom 401 Unauthorized -> [Help 1]
Run Code Online (Sandbox Code Playgroud)

在这里记录:https : //github.com/nalbion/vosk-api/runs/683615393?check_suite_focus=true

我的理解是actions/setup-java …

github-actions

2
推荐指数
1
解决办法
1416
查看次数