小编Bra*_*ino的帖子

npm安装在Windows上随机失败

npm install在我们的Windows构建服务器上运行时,该命令会间歇性地失败

error   errno: -4048,
error   code: 'EPERM',
error   path: 'C:\\Users\\bamboo\\AppData\\Roaming\\npm-cache\\readable-stream\\1.0.33\\package\\package.json',
error   parent: 'through2' }
error Please try running this command again as root/Administrator.
Run Code Online (Sandbox Code Playgroud)

即使该命令在以管理员身份运行的命令提示符中以管理员身份执行.命令失败的程序包每次都会变化,而其他Windows计算机在npm install使用相同的源运行时不会出现此问题.

我已经尝试npm cache clean并手动删除C:\ Users \%username%\ AppData \npm-cache目录中的内容而没有运气.我还检查了npm-cache目录,NodeJS安装目录和包含源代码checkout的目录的权限,并且都显示管理员组具有完全权限,并且admin用户(运行该npm install命令的用户)拥有目录.我也尝试过最新版本的npm(2.13.4)以及旧版本(2.11.3).

是什么导致此权限错误?

以下是npm-debug.log文件的内容:

236980 info install write-file-atomic@1.1.2
236981 info postinstall write-file-atomic@1.1.2
236982 info install npm@2.13.4
236983 info postinstall npm@2.13.4
236984 verbose unlock done using C:\Users\bamboo\AppData\Roaming\npm-cache\_locks\npm-723363012edbbbaa.lock for c:\bamboo-home\xml-data\build-dir\SB-MB-JOB1\Web\node_modules\npm
236985 verbose stack Error: EPERM, rename 'C:\Users\bamboo\AppData\Roaming\npm-cache\readable-stream\1.0.33\package\package.json'
236985 verbose stack     at Error (native) …
Run Code Online (Sandbox Code Playgroud)

windows node.js npm

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

使用 OpenSSL 生成具有主体名称的客户端证书

我需要在主题备用名称下生成一个带有“NT 主体名称”和“RFC 822 名称”的客户端身份验证证书,类似于此证书,如 macOS 钥匙串访问中所示(隐藏字段值为 AD UPN,例如test@domain.com):

具有主体名称的示例证书

我已经尝试使用 OpenSSL 通过以下命令生成客户端身份验证证书: openssl req -x509 -config cert_config -extensions 'my server exts' -nodes -days 365 -newkey rsa:4096 -keyout client.key -out client.crt

和这个 cert_config 文件:

[ req ]
    prompt             = no
    distinguished_name = my dn

[ my dn ]
            commonName = Test
           countryName = US
          localityName = Anywhere
      organizationName = Test
organizationalUnitName = Dev
   stateOrProvinceName = CO
          emailAddress = info@test.com
                  name = Test Cert
               surname = Cert
             givenName = Test
              initials …
Run Code Online (Sandbox Code Playgroud)

ssl openssl

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

无法识别指定的类型错误反序列化XML

我正在尝试使用C#反序列化以下XML:

<stix:STIX_Package xmlns:stixVocabs="http://stix.mitre.org/default_vocabularies-1" 
    xmlns:stixCommon="http://stix.mitre.org/common-1" 
    xmlns:stix="http://stix.mitre.org/stix-1" 
    xmlns:indicator="http://stix.mitre.org/Indicator-2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    id="repository:03163c66-23ed-4e7f-8814-be1d08406" version="1.0">
    <stix:Indicators>
        <stix:Indicator id="repository:9df9af32-3b29-4482-81ac-9c090a44db8c"
            xsi:type="indicator:IndicatorType" negate="false" version="2.0">
            <indicator:Title>admin on 24th September 2014 - (1) FileObjects</indicator:Title>
            <indicator:Type xsi:type="stixVocabs:IndicatorTypeVocab-   1.0">Exfiltration</indicator:Type>
            <indicator:Description>Some Ex filtration Happened</indicator:Description>
        </stix:Indicator>
        <stix:Indicator id="repository:9df9af32-3b29-4482-81ac-9c090a44db8d" xsi:type="indicator:IndicatorType" negate="false" version="2.0">
            <indicator:Title>admin on 24th September 2014 - (2) FileObjects</indicator:Title>
            <indicator:Type xsi:type="stixVocabs:IndicatorTypeVocab-1.0">Exfiltration</indicator:Type>
            <indicator:Description>Some Ex filtration Happened Again</indicator:Description>
        </stix:Indicator>
    </stix:Indicators>
</stix:STIX_Package>
Run Code Online (Sandbox Code Playgroud)

我的班级结构:

[XmlType(AnonymousType = true, Namespace = "http://stix.mitre.org/stix-1")]
[XmlRoot(Namespace = "http://stix.mitre.org/stix-1", IsNullable = false)]
public class STIX_Package
{
    [XmlArrayItemAttribute("Indicator", IsNullable = false)]
    public IndicatorType[] Indicators { get; …
Run Code Online (Sandbox Code Playgroud)

c# xml

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

标签 统计

c# ×1

node.js ×1

npm ×1

openssl ×1

ssl ×1

windows ×1

xml ×1