小编Omr*_*eor的帖子

Jenkins错误:"错误:除非提供有效的用户名/密码,否则无法安装JDK."

我已经为我的jenkins服务器添加了一个新的slave,连接本身似乎通过ssh成功,但是当我尝试在该服务器上构建时,Job尝试在slave上下载Java(即使java已经全部安装在该服务器上)服务器),我得到以下错误:

http://download.oracle.com/otn/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.tar.gz下载JDK 您的Oracle帐户似乎无效.请指定有效的用户名/密码错误:除非提供有效的用户名/密码,否则无法安装JDK.完成:失败

这是java -version的输出

openjdk版本"1.8.0_131"OpenJDK运行时环境(版本1.8.0_131-b12)OpenJDK 64位服务器VM(版本25.131-b12,混合模式)

我需要做什么?手动重新安装java?

jenkins jenkins-slave

9
推荐指数
2
解决办法
9514
查看次数

致命:.git/info/refs无效:这是一个git存储库吗?

我有一个在Assembla上托管的Git存储库,我正在尝试执行它:

git push -u origin master
Run Code Online (Sandbox Code Playgroud)

我一遍又一遍地得到以下错误:

fatal: https://[url]/[repo-name].git/info/refs not valid: is this a git repository?
Run Code Online (Sandbox Code Playgroud)

我在这里尝试了答案但没有成功:Git .git/info/refs无效:这是一个git存储库吗?

我用的时候:

git status
Run Code Online (Sandbox Code Playgroud)

我明白了:

On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
Run Code Online (Sandbox Code Playgroud)

git github

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

致命:无法读取对象 xxx:权限被拒绝

我正在尝试运行:

git checkout master
Run Code Online (Sandbox Code Playgroud)

我不断收到:致命的:

failed to read object 9466835e6cb608c32ec4bf98b2acfa421fd77d3d: Permission denied
Run Code Online (Sandbox Code Playgroud)

我尝试运行:

chown -R my-user *
Run Code Online (Sandbox Code Playgroud)

没有帮助。有什么建议么?

git

6
推荐指数
1
解决办法
5512
查看次数

Sqlalchemy 和 Python - 返回 ID 的 upsert 语句

我正在写一个 sqlalchemy upsert 语句,我想知道是否有办法从数据库取回 Id?到目前为止我的代码如下:

def handle_events(self, events):
    agg = []
    agg.extend(self._get_dicts(events))
    if not agg:
        return
    with DB.session(writable=True) as session:
        response = session.execute(self._generate_upsert_stmnt(agg))


def _generate_upsert_stmnt(self, items):
    model_class = models.MyModel
    table = model_class.__table__
    insert_statement = sa.dialects.postgresql.insert(table, items)
    upsert_statement = insert_statement.on_conflict_do_update(
        index_elements=[table.c['id']],
        set_={c.name: c for c in insert_statement.excluded if c.name != ["id", "my_model", "my_model_id"]}
    )
    return upsert_statement
Run Code Online (Sandbox Code Playgroud)

此代码片段中的 Session 是从 sqlalchemy 的 api(包装在上下文管理器中)的 sessionmaker 调用返回的对象。有没有办法让这个 upsert 语句返回所有 id(插入的和更新的)?如果是这样,代码会是什么样子?提前致谢。ps 如果重要的话数据库是postgres。

python sqlalchemy

6
推荐指数
1
解决办法
1304
查看次数

SAMLException: Response has invalid status code status message is null

Im trying to implement spring-securtiy-saml integration as a SP with an adfs system, and im bumping my head for some days now with this exception happening when SAMLResponnse is sent back from the ADFS after successful authentication and the following exception is thrown. this is the DEBUG log:

2017-10-02 18:05:09,246 - DEBUG [http-apr-443-exec-9] BaseMessageEncoder - Successfully encoded message.
2017-10-02 18:05:09,246 - INFO  [http-apr-443-exec-9] SAMLDefaultLogger - AuthNRequest;SUCCESS;208.95.100.30;saml2.glassboxdigital.com;http://this/is/a/valid/url;;;
2017-10-02 18:05:09,859 - DEBUG [http-apr-443-exec-3] SAMLProcessingFilter - Request is to process authentication
2017-10-02 18:05:09,860 …
Run Code Online (Sandbox Code Playgroud)

spring-security single-sign-on opensaml saml-2.0 spring-saml

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

将 protobuf 可选字段更改为 oneof

我有以下消息:

message Message {
    int64 id = 1;
    google.protobuf.FloatValue weight = 2;
    google.protobuf.FloatValue override_weight = 3;
}
Run Code Online (Sandbox Code Playgroud)

我希望更改权重和 override_weight(可选字段)的类型,google.protobuf.DoubleValue以便我所做的是以下内容:

message Message {
    int64 id = 1;
    oneof weight_oneof {
        google.protobuf.FloatValue weight = 2 [deprecated=true];
        google.protobuf.DoubleValue double_weight = 4;
    }
    oneof override_weight_oneof {
        google.protobuf.FloatValue override_weight = 3 [deprecated=true];
        google.protobuf.DoubleValue double_override_weight = 5;
    }
}
Run Code Online (Sandbox Code Playgroud)

我的问题是,假设我有旧消息,这些消息是由以前的 protobuff 消息编译器为旧消息编译的,我是否能够将它们解析为新消息?该文档对此非常模糊:

“将可选字段移入或移出 oneof:在消息被序列化和解析后,您可能会丢失一些信息(某些字段将被清除)。但是,您可以安全地将单个字段移入新的 oneof,并且可能能够如果已知只设置了一个字段,则移动多个字段。”

以前有人尝试过这个吗?这种情况的最佳做法是什么?

protocol-buffers python-3.x

5
推荐指数
1
解决办法
4346
查看次数