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.

Using git below version 2.7 requires remote (e.g. GitHub) credentials on every run (for private repos)

See original GitHub issue

Summary

When Streamlit uses Git to detect branch/remote information. It uses GitPython package to

Steps to reproduce

What are the steps we should take to reproduce the bug:

  1. Install an old version of git (< 2.7)
  2. Create/run a streamlit script on a private repo

Expected behavior:

No credentials should be asked for.

Actual behavior:

You should see credentials being asked for (and asked on every rerun).

Is this a regression?

yes - because we never required gitpython in the past.

Debug info

  • Streamlit version: 0.68+

Additional information

See https://discuss.streamlit.io/t/running-locally-streamlit-prompts-to-login-to-my-git-repo-how-can-i-disable/6751/19 Issue is brought up to https://github.com/gitpython-developers/GitPython/blob/master/git/remote.py#L528

Can also just log that git is pretty old.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
eudoxoscommented, Nov 16, 2020

Please add an option to disable git requests altogether. I am forcing page reload when new data arrives (session.request_rerun), about once a second, and see

2020-11-16 14:15:14 frap git.cmd[279370] DEBUG Popen(['git', 'rev-parse', '--show-toplevel'], cwd=/some/path, universal_newlines=False, shell=None, istream=None)
2020-11-16 14:15:14 frap git.cmd[279370] DEBUG Popen(['git', 'remote', 'get-url', '--all', 'origin'], cwd=/some/path, universal_newlines=False, shell=None, istream=None)

at every reload. This means spawning two processes every second.

0reactions
mkleinbortcommented, Feb 19, 2021

Hi @kmcgrady

I have (*had) GitPython==2.0.6

I tried upgrading it to GitPython==3.1.13 and this solved the issue.

Thanks for the advice, this was a major pain point for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

It is possible to add a dependency of a private git repo? #835
Yes I use that command all the time in multiple public/private github repos. I think the next step in solving this would be...
Read more >
Why is Git always asking for my password? - GitHub Docs
If Git prompts you for a username and password every time you try to interact with GitHub, you're probably using the HTTPS clone...
Read more >
Not able to use private git repo for build context in Docker ...
I have a private repo with src and Dockerfile to build from, and I am connecting to a remote docker host using docker-machine....
Read more >
Error: Permission denied (publickey) - GitHub Docs
A "Permission denied" error means that the server rejected your connection. There could be several reasons why, and the most common examples are...
Read more >
Marketplace Actions Configure git credentials - GitHub
GitHub requires the use of a Personal Access Token assigned to the calling workflow secrets for pushing to repositories other than the repo...
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