Code Monkey home page Code Monkey logo

Comments (2)

ozbillwang avatar ozbillwang commented on May 18, 2024 5

this is very basic knowledge about ssh and docker, I would leave this to you and fix by yourself.

Issue is closed.

from git.

Kostanos avatar Kostanos commented on May 18, 2024

The same as with previous issue that I opened.
The solution for this already exists, you just missing it in alpine/git image, and it would be great to have it integrated, without needing to run all this from inside of container.

At this moment, the only way to resolve this issue with this image is by running it inside container.

Something like this:

        - name: my-init
          image: alpine/git
          imagePullPolicy: IfNotPresent
          command: [ "/bin/sh", "-e", "-c" ]
          args:
            - mkdir -p /root/.ssh;
              echo "Generate /root/.ssh/known_hosts";
              touch /root/.ssh/known_hosts;
              ssh-keyscan -H ${HOSTNAME} >> ~/.ssh/known_hosts;
              echo "Create id_rsa";
              echo $DEPLOY_KEY | sed "s/\\\n/\n/g" > /root/.ssh/id_rsa;
              chmod 400 -R /root/.ssh;
              ls -ls /root/.ssh/;
              echo "Cloning Repository";
              git clone -b "{{BRANCH}}" --single-branch -- ${GIT_REPO} /data;
              ls -ls /data;
              echo "Done";

Absense of this and Host verification functionality in this image, makes this image practically useless, and you can use it only in some very specific scenarious.

But it is up to you just to close the topic instead of develop the solution.

from git.

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.