小编kru*_*pen的帖子

GitLab HTTP远程上的git命令失败,403

我有一个GitLab 5.0安装,突然,由于没有明显的原因,突然启动gitHTTP URL上的命令失败.任何命令如git clone/pull/push失败,并出现以下错误:

fatal: unable to access 'http://host/user/project.git/': The requested URL returned error: 403
Run Code Online (Sandbox Code Playgroud)

在提示用户/密码之前发生错误.这适用于现有项目和新项目.SSH URL继续正常工作.HTTP上的GitLab UI也可以正常工作.

知道什么可能是错的或如何解决它?

http-status-code-403 gitlab

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

具有两个参数的构造函数的应用样式解析器

我想在尖括号中为逗号分隔的值对编写解析器.我用它采用以下方法:

pair p1 p2 = do
    x1 <- p1
    comma
    x2 <- p2
    return (x1, x2)

data Foo = Foo (Bar, Bar)

foo :: Parser Foo
foo = Foo <$> (angles $ pair bar bar)
Run Code Online (Sandbox Code Playgroud)

但是我更喜欢Foo构造函数采用两个参数而不是元组:

data Foo = Foo Bar Bar
Run Code Online (Sandbox Code Playgroud)

编写这样一个解析器的最佳方法是什么?理想情况下,我想重用标准的Parsec解析器,angles并尽可能使用applicative.

haskell parsec applicative

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