今日已更新 217 条资讯 | 累计 37466 条内容
关于我们

标签:#Git

找到 1710 篇相关文章

AI 资讯

How I Removed AWS Access Keys from GitLab CI/CD with OIDC

When I first connected my GitLab CI/CD pipelines to AWS, I used the simplest solution: an IAM user with an Access Key and Secret Access Key stored as GitLab CI/CD variables. It worked. But there was one problem: those credentials were permanent. They had to be stored, protected and eventually rotated. If they were accidentally exposed in logs or compromised, they could remain valid until manually revoked. I wanted a cleaner solution. So I replaced permanent AWS credentials with OIDC federation between GitLab and AWS . The result is simple: GitLab pipelines can access AWS without storing any permanent AWS credentials. In this post, I'll explain how I implemented it, how the authentication flow works, and one important issue I faced when using it with EKS and Terraform. The architecture The authentication flow looks like this: ┌──────────────┐ │ GitLab CI │ └──────┬───────┘ │ │ OIDC token ▼ ┌──────────────┐ │ AWS STS │ └──────┬───────┘ │ │ Temporary credentials ▼ ┌──────────────┐ │ IAM Role │ └──────┬───────┘ │ ├──────────► Terraform │ ├──────────► ECR │ └──────────► EKS Instead of GitLab storing an AWS Access Key, it proves its identity to AWS using a short-lived OIDC token. AWS verifies the token and returns temporary credentials. How does OIDC authentication work? The process can be summarized in five steps: GitLab creates an OIDC token for the CI/CD job. The pipeline sends this token to AWS. AWS verifies that the token really comes from GitLab. AWS checks that the project is allowed to assume the requested IAM role. AWS STS returns temporary credentials. These credentials expire automatically. So there is nothing permanent to store or rotate inside GitLab. Step 1 — Register GitLab as an OIDC provider AWS first needs to trust GitLab as an identity provider. I configured the OIDC provider using Terraform: data "tls_certificate" "gitlab" { url = "${var.gitlab_url}/.well-known/openid-configuration" } resource "aws_iam_openid_connect_provider" "gitlab" { url = var . gi

2026-08-12 原文 →
开发者

Using the GitHub Copilot SDK for Java

Enterprise Java developers have a new superpower—drive GitHub Copilot from idiomatic Java code with annotations, virtual threads, and more. The post Using the GitHub Copilot SDK for Java appeared first on The GitHub Blog .

2026-08-11 原文 →
AI 资讯

Ayo GitHub Quietly Killed the Unreviewable Mega-PR

If you've ever opened a PR with 47 changed files and a diff so long GitHub just gives up and shows you "Load Diff" seventeen times, this one's for you. GitHub quietly shipped what might be the biggest pull request update in years, and it's aimed squarely at that problem. Let's talk about stacked pull requests. The problem, in one sentence Big PRs are where good reviews go to die. Nobody reads a 2000 line diff carefully. Some folks reach for AI code review tools like LiveReview to take the edge off, and honestly that helps, but even the best reviewer (human or model) does a better job on a tight, focused diff than on a 2000 line wall. Smaller inputs, better reviews. That's true no matter who's doing the reviewing. Stacked PRs are GitHub's answer: break one massive change into a chain of small, dependent PRs, where each one only reviews the diff it actually introduces, not everything below it. What a stack actually is The rule is simple. You need two or more PRs in the same repo where: The bottom PR targets your trunk branch (usually main ) Every PR after that targets the PR below it, not main That's it. That's the whole trick. Foundational stuff (schemas, shared types) goes at the bottom. Stuff that depends on it (API routes, UI) goes higher up the chain. And here's the part that surprised me: if you just do this manually with plain git, by opening PR #11 against the branch for PR #10 instead of against main , GitHub now recognizes that as a stack automatically. No special tool required. It just notices the base branches form a chain and lights up a banner. Stacking isn't a git concept at all, it's purely a GitHub UI concept layered on top of branches you were already making. Let's actually build one Enough theory. I built a real stack in one of my own repos ( peektea , a terminal file browser I maintain), using a harmless scratch file so nothing real got touched. Here's the actual terminal session, copy pasted, warts and all. First I tried to be fancy and use the CL

2026-08-11 原文 →