question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Do not auto-ignore local.settings.json from Git.

See original GitHub issue

I feel local.settings.json should remain for local non-Azure settings only, as there is big difference between running locally in an emulator and running in an actual Azure environment.

I think, however, local.settings.json should not be auto-ignored form Git.

When a new developer comes on-board and pulls a function app project, they cannot run it locally as the local.settings.json is missing.

Thank you

See also: https://github.com/Azure/azure-functions-host/issues/1594 https://github.com/Azure/azure-functions-host/issues/3189

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Sergey-Nosov-CloudFitcommented, Mar 1, 2022

local.settings.json is a wrong place to store secrets, that is what secrets.json is for (right click application, Manage User Secrets).

Here is a typical local.settings.json; no secrets there:

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet"
  },
  "Host": {
    "CORS": "*"
  }
}
0reactions
msftbot[bot]commented, Mar 18, 2022

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to properly handle secrets in a local.settings.json file ...
I have an Azure function with a few secrets in its local.settings.json file. What are the best practices when I want to share...
Read more >
Azure Functions local.settings.json Secrets and Source ...
First the local. settings. json settings are applied, then our secrets and local overrides from secrect. settings.
Read more >
Ignore file changes with Git - Azure Repos
In the Git Changes window, right-click any changed file that you want Git to ignore and choose Ignore this local item or Ignore...
Read more >
rsync(1) manpage
Rsync refers to the local side as the client and the remote side as the server. Don't confuse server with an rsync daemon....
Read more >
Use settings.json in your C# Azure Functions
The local.settings.json file is where you can define the values for your project in your developer environment. This file must not be added ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found