0
저는 libgit2에서 새롭습니다. 내 문제는 약 git_remote_connect
함수입니다,이 문제는 여러 날 동안 나를 혼란 시켰습니다.git_remote_connect 항상 잘못된 반환
git_remote_connect
를 사용할 때, 항상 잘못 반환
메시지는 다음과 같습니다 당신이 잠시 포함되지 않은 사용에 libgit2을 요구하고
git_remote *remote = NULL;
git_remote_load(remote, git_repo, remote_name);
// output the correctly result, just like run: git remote -v
g_message("remote user:", git_remote_name(remote)); // github-username
g_message("remote url:", git_remote_url(remote)); // [email protected]/github-username/Repo
if (git_remote_connect(remote, GIT_DIRECTION_FETCH) < 0) {
const git_error *e = giterr_last();
g_error("connect wrong!\n"
"message: %s",
e->message);
}