Trong dự án đường ống jenkins của tôi, tôi có thể kiểm tra mã từ git tốt ... nhưng chúng tôi cần phải thực hiện một số kiểm tra git và thông tin đăng nhập dường như không được lưu trữ.jenkins đường ống không thể kiểm tra mã vào git
stage 'Checkout'
git url: '[email protected]:myproj.git', branch: 'master', credentialsId: '012ce21d-e920-44ee-b6f7-08df8ab41de0', variable: 'CREDENTIALS'
sh('git push') <---- fails with Permission denied (public key).
đây là mẫu đầu ra:
Entering stage Checkout
Proceeding
[Pipeline] git
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url [email protected]:myproj # timeout=10
Fetching upstream changes from [email protected]:myproj.git
> git --version # timeout=10
using GIT_SSH to set credentials
> git -c core.askpass=true fetch --tags --progress [email protected]:myproj.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision cc35402c6b39e8a1f8d55a831d2d10215d47ccd0 (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f cc35402c6b39e8a1f8d55a831d2d10215d47ccd0 # timeout=10
> git branch -a -v --no-abbrev # timeout=10
> git branch -D master # timeout=10
> git checkout -b master cc35402c6b39e8a1f8d55a831d2d10215d47ccd0
> git rev-list cc35402c6b39e8a1f8d55a831d2d10215d47ccd0 # timeout=10
[Pipeline] sh
[myproj] Running shell script
+ git push --set-upstream origin master
Warning: Permanently added the RSA host key for IP address '192.192.143.2' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
ai có một giải pháp tốt để điều này?
nhờ
bạn đang sử dụng Jenkins ra từ Docker? –
những nô lệ chạy trong docker, không nghĩ rằng vấn đề mặc dù –
Gần đây tôi đã có một vấn đề tương tự trên nô lệ Windows ... Chỉ cần chắc chắn, bạn có thể cho chúng tôi biết kết quả của đường ống của bạn nếu bạn chạy nó từ tổng thể? Ngoài ra, bạn đã cấu hình quyền lưu trữ chính xác chưa? Từ git @ gitbucket url của bạn nó nói rằng một người dùng git nên có quyền truy cập vào repo của bạn – Pom12