Giter Club home page Giter Club logo

edudu's People

Contributors

bwood avatar stopfstedt avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

emmairwin

edudu's Issues

Provide options for storing Github credentials

Related: #1

If we turn edudu_github into a module or feature, we maybe we should provide multiple ways you can configure your credentials:

1st choice use server environment variables.

2nd choice use a settings.php include like below.

3rd choice add add them to the db via an admin form and we use some sort of 2-way encryption to attempt to secure them. (Suggestions?)

2nd choice solution:

My solution:

mkdir sites/default/files/328bdw1989

prevent browsing here

echo "Deny from all
Options None
Options +FollowSymLinks" > sites/default/files/328bdw1989/.htaccess

replace this stuff with your personal github user/pass

echo '<?php
$conf['edudu_ghu'] = "yourusername";
$conf['edudu_ghp'] = "yourpass";' > sites/default/files/328bdw1989/ada89988895b2aa61237ff543188385b

Now manually upload this directory and files to the site on Pantheon by using Dev > Workflow > Import > Files. On your localhost, you can just create this dir under sites/default/files.

include the file in settings.php

echo 'include_once('sites/default/files/328bdw1989/ada89988895b2aa61237ff543188385b');' > sites/default/settings.php

Advantages of this:

credentials are not in the db
    they would either have to be in cleartext or
    encrypted using two-way encryption which is weaker than one-way encryption
credentials are not hardcoded in a version-controlled file. 
    .gitignore should ignore sites/*/files

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.