小编sto*_*tic的帖子

SSL适用于浏览器,wget和curl,但是使用git失败

我有一个网站,我用来托管redmine和几个git存储库

这适用于http,但我不能用https克隆,即

git clone http://mysite.com/git/test.git
Run Code Online (Sandbox Code Playgroud)

工作正常,但是

git clone https://mysite.com/git/test.git
Run Code Online (Sandbox Code Playgroud)

失败

奇怪的是,https似乎适用于我测试的其他所有内容.如果我打开

https://mysite.com/git/test.git
Run Code Online (Sandbox Code Playgroud)

在浏览器中(在chrome和firefox中测试),我没有错误或警告.我还可以

curl https://mysite.com/git/test.git
wget https://mysite.com/git/test.git
Run Code Online (Sandbox Code Playgroud)

两者都没有投诉或警告.

这是git的详细输出:

$ GIT_CURL_VERBOSE=1 git clone https://user@mysite.com/test/test.git
Cloning into test...
Password:
* Couldn't find host mysite.com in the .netrc file; using defaults
* About to connect() to mysite.com port 443 (#0)
*   Trying 127.0.0.1... * Connected to mysite.com (127.0.0.1) port 443 (#0)
* found 157 certificates in /etc/ssl/certs/ca-certificates.crt
* server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
* Closing connection #0
* Couldn't …
Run Code Online (Sandbox Code Playgroud)

apache git ssl redmine

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

如何在连接到iOS的lldb中手动生成核心转储(或等效)

有时我试图在iOS应用中追踪一个非常罕见的错误.在调试之后,我会在调试器中点击它只是为了让xcode或lldb在我调试时崩溃(通常是因为我正在踩踏C++代码).这真是令人愤怒.

使用gdb,您可以使用它generate-core-dump来创建文件的核心转储,以便我可以在gdb中重新加载它,并至少查看所有内存.我想要的是能够在lldb中做类似的事情,这样当xcode崩溃时(因为它总是倾向于在最糟糕的时候做)我可以恢复我的调试会话而不必重现崩溃.

该应用程序运行在一个非越狱的iPhone上,因此我没有太多访问操作系统来执行诸如从那里转储内存之类的操作.

一个可能的答案是只使用gdb而不是lldb,但我认为这会引起一些我目前不记得的其他问题,而且它没有一些在lldb中有用的功能.

xcode ios lldb

14
推荐指数
1
解决办法
8645
查看次数

如何在emacs C++编译模式中跳过"包含在文件中"?

我喜欢使用emacs使用编译模式编译我的C++项目,并next-error跳转到源代码中的警告和错误.但是,我觉得非常烦人的是next-error把我带到编译输出中"包含在文件中"的行的每个#include.我知道您可以使用compilation-skip-threshold跳过警告,但我不想跳过警告,这些包括显示为警告的行.

对我来说这似乎是编译模式中的一个错误(这些不是警告),但这个错误被关闭为"不是错误"

具体来说,对于看起来像这样的输出:

In file included from /path/to/file1.h:linenum1:
In file included from /path/to/file2.h:linenum2:
In file included from /path/to/file3.h:linenum3:
/path/to/file4.h:linenum4:columnnum4: warning: you are bad at c++
Run Code Online (Sandbox Code Playgroud)

我想把next-error我带到file4.h,而不是在路上停在文件1到3中.

谢谢!

c++ emacs compilationmode emacs24

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

在C++ 11中,我可以引用在模板参数中定义的枚举类

这是我试图编写的代码的简化版本:

template<typename Derived>
class StateMachine
{
public:
  void SetState(Derived::State s) {
    static_cast<Derived*>(this)->TransitionTo(s);
  }
};

class MyFSM : public StateMachine<MyFSM>
{
public:
  enum class State {
    State1,
    State2,
    State3
  };
  void TransitionTo(State s) {
    _state = s;
  }
private:
  State _state = State::State1;  
};
Run Code Online (Sandbox Code Playgroud)

我正在使用带有clang的c ++ 11.我在这里得到的错误是10:17: error: missing 'typename' prior to dependent type name 'Derived::State'声明SetState.我也试过添加typename Derived::State DerivedState;然后使用DerivedState而不是Derived::State,但后来我得到了error: unknown type name 'DerivedState'.

更令人困惑的是,我试过typedef typename Derived::State DerivedState;,然后我得到了错误:error: …

c++ enums templates c++11

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

标签 统计

c++ ×2

apache ×1

c++11 ×1

compilationmode ×1

emacs ×1

emacs24 ×1

enums ×1

git ×1

ios ×1

lldb ×1

redmine ×1

ssl ×1

templates ×1

xcode ×1