JanusGraph / janusgraph-python

JanusGraph Python Gremlin Language Variant (GLV)
Other
22 stars 10 forks source link

Remove hardcoded credentials #29

Closed debasishdebs closed 5 years ago

debasishdebs commented 5 years ago

This PR fixes following:

chupman commented 5 years ago

@debasishdebs the credentials will still be in the commit history this way. Can you either squash this with the initial commit and push it as a new PR against master? I'll make a new feature branch and update the target afterwards.

If you want I can do the squash and push on your behalf.

Here's a different workflow option in case it would be easier. I generally use git --amend and then force push to do PR updates for small fixes:

  1. checking out the original commit
  2. checkout out a new branch
  3. make and add your changes
  4. add, or amend, those to the previous commit rather than create a new commit
  5. force push it to the new initial-pr branch
  6. create a pull request pointed at master based off the initial-pr branch you created.

git checkout initial git checkout a6d86d2ad238e06b98f52e4a68d0c70e87c6cc5f git checkout -b initial-pr

make your changes

git add -A git commit --amend git push --force initial-pr

chupman commented 5 years ago

@debasishdebs Can you squash all the commits? Remember to only squash only the commits you created so it doesn't auto close again.

debasishdebs commented 5 years ago

@chupman : I tried squashing commits but somehow my older history still remains :-O . Should I go ahead, create a new PR with credentials removed? Then we can delete this PR and branch. I think that way the credentials won't be stored in Git history.

Again sorry, as all such things with Git like Squashing commit, and merging are new Stuff to me, and I'm learning as I go. So thank you for that :-)

debasishdebs commented 5 years ago

Once the new PR is created, you can apply your change on top of it. That PR will have credentials removed and also my changes which I've done since last few days also included.

chupman commented 5 years ago

The removal of the credentials has to come first before any additional fixes. To squash try this:

git rebase -i 7ca4764e29f5597f3a8d30bf4a8f8dc1f53c1f11

this should have an editor open. you want to change all the commits other than Initial commit to ignore rebase to squash. Once they're squashed you'll need to force push to this branch.

There's an article here that also might help.

If you run into trouble I can do a PR against your branch to make the changes or we can do a screen share on slack and I can walk you through it.

edit: I actually listed the wrong commit, but it has been updated.

chupman commented 5 years ago

Closing as duplicate of #30