Skip to content

A sidecar app which use gce node service credentials to provide Git Auth Callback URL.

License

Notifications You must be signed in to change notification settings

cydu-cloud/git-askpass-gce-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gce-node-auth

A sidecar app which use gce node service credentials to provide Git Auth Callback URL.

Build Image

export PROJECT=MY_GCP_PROJECT
gcloud config set project ${PROJECT}
gcloud builds submit --tag gcr.io/${PROJECT}/git-askpass-gce-node .

Test

Create test repo on GCP Cloud Source Repo

export REPO_NAME=MY_REPO_NAME
gcloud source repos create ${REPO_NAME}
# clone and add some files into the repo

Creating testing pod

eval "cat git-askpass-gce-node.yaml | sed 's/\${PROJECT}/$PROJECT/g' | sed 's/\${REPO_NAME}/$REPO_NAME/g' " | kubectl apply -f -

Check git-askpass-gce-node running

kubectl port-forward pod/git-askpass-gce-node 9102 9102
curl "http://localhost:9102/git_askpass"

Output should be something like:

username=xxx@example.com
password=ya29.xxxxyyyyzzzz

Check git-sync running

kubectl get pod/git-askpass-gce-node
kubectl logs pod/git-askpass-gce-node git-askpass-gce-node
kubectl logs pod/git-askpass-gce-node git-sync
kubectl exec pod/git-askpass-gce-node ls /tmp/git/git-data

About

A sidecar app which use gce node service credentials to provide Git Auth Callback URL.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published