Giter Club home page Giter Club logo

Comments (6)

stp-ip avatar stp-ip commented on July 19, 2024 1

Either run as root:

securityContext:
  runAsUser: 0

Or set the correct permissions on the mounted volume.

from git-sync.

stp-ip avatar stp-ip commented on July 19, 2024

This is basically using plain git over http or ssh... So there shouldn't be any difference to the hosted git repository. What method did you use and what was the error you encountered?

from git-sync.

gorozcoh avatar gorozcoh commented on July 19, 2024

Container git-syn in my pod:

spec:
      containers:
        - name: git-sync
          image: gcr.io/google_containers/git-sync:v2.0.4
          imagePullPolicy: Always
          volumeMounts:
          - name: git-sync
            mountPath: /git
          env:
          - name: GIT_SYNC_REPO
            value: https://bitbucket.org/app247/comercio-addons
          - name: GIT_SYNC_DEST
            value: git
          - name: GIT_SYNC_USERNAME
            value: my-username
          - name: GIT_SYNC_PASSWORD
            value: my-password

Volume git-sync is emptyDir: {}
In describe pod:

 <invalid>     <invalid>       1       kubelet, gke-cluster-1-default-pool-69a7e6ee-hrrd       spec.containers{git-sync}       Normal          Created         Created container with id 413962123e3f46243532d32d0ddbd007a8012bf68b61111d3d6bb596dd553a61
  <invalid>     <invalid>       1       kubelet, gke-cluster-1-default-pool-69a7e6ee-hrrd       spec.containers{git-sync}       Normal          Started         Started container with id 413962123e3f46243532d32d0ddbd007a8012bf68b61111d3d6bb596dd553a61
  <invalid>     <invalid>       2       kubelet, gke-cluster-1-default-pool-69a7e6ee-hrrd                                       Warning         FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "git-sync" with CrashLoopBackOff: "Back-off 10s restarting failed container=git-sync pod=odoo-10-comercio-4113950861-k7sq2_app-247-1(0964ce24-9d4d-11e7-8712-42010af002d5)"

Thanks.

from git-sync.

stp-ip avatar stp-ip commented on July 19, 2024

What does the log output say? You can use kubectl logs -p to get the logs for the previous container.

from git-sync.

gorozcoh avatar gorozcoh commented on July 19, 2024

ERROR: can't create .netrc file: error setting up git credentials exit status 255: error: could not lock config file //.gitconfig: Permission denied

from git-sync.

gorozcoh avatar gorozcoh commented on July 19, 2024

It's done. Thanks a lot. Cheers.

from git-sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.