Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git 拉取无效 #1224

Closed
Ronghefeng opened this issue Nov 4, 2022 · 10 comments
Closed

git 拉取无效 #1224

Ronghefeng opened this issue Nov 4, 2022 · 10 comments
Labels
bug Something isn't working git Git related v0.6 Version v0.6.x

Comments

@Ronghefeng
Copy link

Ronghefeng commented Nov 4, 2022

Bug 描述
在爬虫详情配置页,git 模块,点击拉取无反应,日志提示需要认证,但是在配置页已经添加认证账户和密码

版本描述

docker & docker-compose
5876b19387359109b90e01297c4cd46

crawlab
e44cfa143f918edf5d43b3333857b7a

复现步骤
image

期望结果
可以拉取远程文件

日志报错信息
f6f7b0697d4d5bf32c0eeac740554bc

日志文件记录
err.log

@Ronghefeng Ronghefeng added the bug Something isn't working label Nov 4, 2022
@tikazyq tikazyq added git Git related v0.6 Version v0.6.x labels Nov 4, 2022
@ysslang
Copy link

ysslang commented Feb 16, 2023

Same here. But when I clicked Pull, the error log is

empty git-upload-pack given
/go/pkg/mod/github.com/crawlab-team/[email protected]/trace.go:13 github.com/crawlab-team/go-trace.TraceError()
/go/pkg/mod/github.com/crawlab-team/crawlab-vcs@v0.6.0-beta.20211113.2048.0.20221024150201-467fe22630f8/git.go:172 github.com/crawlab-team/crawlab-vcs.(*GitClient).Pull()
/go/pkg/mod/github.com/crawlab-team/[email protected]/controllers/spider.go:1082 github.com/crawlab-team/crawlab-core/controllers.(*spiderContext)._gitPull()
/go/pkg/mod/github.com/crawlab-team/[email protected]/controllers/spider.go:577 github.com/crawlab-team/crawlab-core/controllers.(*spiderContext).gitPull()
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:173 github.com/gin-gonic/gin.(*Context).Next()
/go/pkg/mod/github.com/crawlab-team/[email protected]/middlewares/auth.go:48 github.com/crawlab-team/crawlab-core/middlewares.AuthorizationMiddleware.func1()
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:173 github.com/gin-gonic/gin.(*Context).Next()
/go/pkg/mod/github.com/crawlab-team/[email protected]/middlewares/cors.go:17 github.com/crawlab-team/crawlab-core/middlewares.CORSMiddleware.func1()
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:173 github.com/gin-gonic/gin.(*Context).Next()
/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:101 github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1()
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:173 github.com/gin-gonic/gin.(*Context).Next()
/go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:240 github.com/gin-gonic/gin.LoggerWithConfig.func1()
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:173 github.com/gin-gonic/gin.(*Context).Next()
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:616 github.com/gin-gonic/gin.(*Engine).handleHTTPRequest()
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:572 github.com/gin-gonic/gin.(*Engine).ServeHTTP()
/usr/local/go/src/net/http/server.go:2868 net/http.serverHandler.ServeHTTP()
/usr/local/go/src/net/http/server.go:1933 net/http.(*conn).serve()
/usr/local/go/src/runtime/asm_amd64.s:1371 runtime.goexit()

And I found this was fixed here. Maybe we need to bump up the go-git kit?

tikazyq added a commit to crawlab-team/crawlab-vcs that referenced this issue Jun 3, 2023
tikazyq added a commit to crawlab-team/crawlab-core that referenced this issue Jun 3, 2023
tikazyq added a commit to crawlab-team/crawlab-core that referenced this issue Jun 4, 2023
@Annisun2016
Copy link

版本: v6.0.1

image

@tikazyq
Copy link
Collaborator

tikazyq commented Jun 5, 2023

版本: v6.0.1

image

是否为最新版本?

@Annisun2016
Copy link

版本: v6.0.1
image

是否为最新版本?

是最新版,v6.0.1

@tikazyq
Copy link
Collaborator

tikazyq commented Jun 16, 2023

现在是否还存在这样的问题?

@rengwei777
Copy link

ssh: no key found 是什么问题

@rengwei777
Copy link

使用git有更详细的教程吗

@hy928302776
Copy link

git拉取无效解决了吗
image
点击拉取根本没用呀,求助

@tikazyq
Copy link
Collaborator

tikazyq commented Jul 1, 2023

自2021年11月13日起,GitHub停止接受使用基本身份验证(Basic Authentication)的密码登录。这意味着你不能直接使用Basic Auth登录GitHub。

GitHub现在要求使用个人访问令牌(Personal Access Token,PAT)或使用SSH密钥进行身份验证。PAT是一个专门用于身份验证的令牌,你可以在GitHub的设置页面上生成和管理它。生成PAT后,你可以将其用作密码来访问GitHub的API、命令行界面或其他需要身份验证的应用程序。

如果你想使用命令行界面与GitHub进行交互,你可以使用PAT来代替密码进行认证。例如,在使用Git命令行进行操作时,你可以使用PAT作为密码。

需要注意的是,如果你已经生成了PAT,要妥善保管它,不要泄露给他人。PAT相当于你的密码,可以访问你有权限的GitHub资源。如果你怀疑PAT已经泄露,你可以在GitHub上撤销它,并生成一个新的。

总结来说,GitHub不再支持直接使用Basic Auth进行登录,而是要求使用个人访问令牌(PAT)或SSH密钥进行身份验证。

@tikazyq
Copy link
Collaborator

tikazyq commented Jul 1, 2023

因此,在Crawlab中,如果你的仓库是GitHub代码仓库,请将你的密码替换成PAT,再进行拉取即可。

@tikazyq tikazyq closed this as completed Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working git Git related v0.6 Version v0.6.x
Projects
None yet
Development

No branches or pull requests

6 participants