ChrisYounger / git_for_splunk

Simple versioning for your Splunk environment
https://splunkbase.splunk.com/app/4182
Apache License 2.0
36 stars 10 forks source link

Getting Authentication Error #4

Open richielynch89 opened 4 years ago

richielynch89 commented 4 years ago

Hi,

Thanks for making this application freely available. Its great!

I am in the process of setting up the app in my environment. When using the input feature to regularly push changes to GitHub, it always fails at the "push" part. image

When I look at the raw data it shows that it is failing with the following error: "EXITCODE: 128 An exception of type Exception occurred. Arguments: ('Error occured - is authentication to remote site correct? and network path available?',) runtime=0.29 status=1"

I have set up git so that it pushes changes via ssh which meant that I had to generate a ssh key then start the agent and then add the key to the agent (as well as add it to my GitHub account).

When I run the " git push" command manually on the cli, then it pushes data successfully but that is only after I have started the agent and added the ssh key to it. I have to do this every time I log into the server.

When attempting to push data via the app, then starting the agent and adding the key is not being done which is why I think it is failing.

Did you ever run into the same issue? If so, how did you overcome it?

I was thinking of adding code to the app to start the agent and add the key but maybe I would have to do this every time I update the app so it might not be the best idea.

Thanks, Richie.

ChrisYounger commented 4 years ago

Hi.

This is definitely possible. Give this a try: https://stackoverflow.com/questions/112396/how-do-i-remove-the-passphrase-for-the-ssh-key-without-having-to-create-a-new-ke

If you like my apps please leave a rating on splunkbase :) all the best.

richielynch89 commented 4 years ago

Hi Chris,

Thank you for the link. In the end, the issue was with the ssh config file.

I have another question regarding the set up Git For Splunk within a cluster environment. I have it installed on all 3 nodes now but all 3 nodes attempt to push changes to Splunk. Is this what you would expect to happen? All nodes only attempt to push to Splunk after I have made a change to a Splunk dashboard.

Yes, I will definitely rate the app on Splunkbase once I have it fully setup in my Test environment.

Thank you, Richie.

On Fri, Aug 28, 2020 at 1:46 PM Chris Younger notifications@github.com wrote:

Hi.

This is definitely possible. Give this a try: https://stackoverflow.com/questions/112396/how-do-i-remove-the-passphrase-for-the-ssh-key-without-having-to-create-a-new-ke

If you like my apps please leave a rating on splunkbase :) all the best.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ChrisYounger/git_for_splunk/issues/4#issuecomment-682509782, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQPAIF6NR7VGGXYAJFQKCDSC6RKVANCNFSM4QOAABEQ .

ChrisYounger commented 4 years ago

Yes this is the expected behaviour. In a search head cluster all the servers will (should) be the same anyway, so you can just run the git_for_splunk on one search head. Otherwise setup a separate repo for each server.

richielynch89 commented 4 years ago

Yeah, thats a good point. Setting it up on just one node is probably the way to go so.

Thanks very much for your quick response Chris. I'll be sure to rate the app soon!

All the best, Richie.

On Tue, Sep 22, 2020 at 9:54 AM Chris Younger notifications@github.com wrote:

Yes this is the expected behaviour. In a search head cluster all the servers will (should) be the same anyway, so you can just run the git_for_splunk on one search head. Otherwise setup a separate repo for each server.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ChrisYounger/git_for_splunk/issues/4#issuecomment-696593485, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQPAIE7PWGEDWNHSW26M7TSHBQ3NANCNFSM4QOAABEQ .

richielynch89 commented 4 years ago

Hi Chris,

I was thinking about the two options you suggested. If I install the app on just one node in the cluster then there is a risk that the node will be down for a long duration of time and would catch any changes to Splunk objects. If I install the app on all nodes then it would be overkill having many repos with the same files.

Another thing I was discussing with my colleague was we could install the app on all nodes in the SHC but modify the app so that it only pushes to the repo on whichever node is the captain. Did you ever consider this? If so, are you aware of any end-point that would tell us the captain of a SHC?

Thanks, Richie.

On Tue, Sep 22, 2020 at 9:57 AM Richie Lynch richardlynch89@gmail.com wrote:

Yeah, thats a good point. Setting it up on just one node is probably the way to go so.

Thanks very much for your quick response Chris. I'll be sure to rate the app soon!

All the best, Richie.

On Tue, Sep 22, 2020 at 9:54 AM Chris Younger notifications@github.com wrote:

Yes this is the expected behaviour. In a search head cluster all the servers will (should) be the same anyway, so you can just run the git_for_splunk on one search head. Otherwise setup a separate repo for each server.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ChrisYounger/git_for_splunk/issues/4#issuecomment-696593485, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQPAIE7PWGEDWNHSW26M7TSHBQ3NANCNFSM4QOAABEQ .

ChrisYounger commented 4 years ago

Hi Richie, Yes this is the risk of having it only on one server in a SHC. It seems like a good idea to have only the captain push, however this would cause all sorts of problems as each server would be at a different point in time whenever it tries to push changes to the central repo.

I think its a lot easier to just have all Search heads push to their own repos. The overhead of this work is minimal (its only pushing deltas). If you are using a cloud-based external repository then there is more overhead, but it still wouldn't be too great as long as you set proper gitignore to exclude files like csvs.

All the best.

dimarra commented 3 years ago

In the end, the issue was with the ssh config file.

Do share the changes that fix your issue. Thanks.

richielynch89 commented 3 years ago

Thanks for your help Chris. We're going to implement the solution of having a repo for every node and test it to be sure everything works as expected.

On Wed, Sep 23, 2020 at 8:21 PM Chris Younger notifications@github.com wrote:

Hi Richie, Yes this is the risk of having it only on one server in a SHC. It seems like a good idea to have only the captain push, however this would cause all sorts of problems as each server would be at a different point in time whenever it tries to push changes to the central repo.

I think its a lot easier to just have all Search heads push to their own repos. The overhead of this work is minimal (its only pushing deltas). If you are using a cloud-based external repository then there is more overhead, but it still wouldn't be too great as long as you set proper gitignore to exclude files like csvs.

All the best.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ChrisYounger/git_for_splunk/issues/4#issuecomment-697922020, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQPAIEIYDWCR4FPLKYYYMDSHJDD5ANCNFSM4QOAABEQ .

richielynch89 commented 3 years ago

The config file was pointing at a different RSA key. I changed it to point at the key I created for my GitHub repo.

On Tue, Oct 6, 2020 at 11:40 PM dimarra notifications@github.com wrote:

In the end, the issue was with the ssh config file.

Do share the changes that fix your issue. Thanks.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ChrisYounger/git_for_splunk/issues/4#issuecomment-704590801, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQPAIBISSVYHOJSTX7EXBDSJOMHTANCNFSM4QOAABEQ .