Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompted for Username and Password on every Git Clone while using Docker #4

Open
Sorsnce opened this issue Oct 3, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@Sorsnce
Copy link

Sorsnce commented Oct 3, 2019

While running this in Docker

docker run -ti --rm -e GITHUB_WATCHER_TOKEN=your_access_token duolabs/secret-bridge poll

I get prompted every time GitHub does a "pull"

INFO:root:Cloning repository ORG/REPO into /tmp/tmpglfe5wn9repo
Username for 'https://github.com': 

It appears that processor.py is not passing the GitHub token from the config.toml
See on line 35 in processor.py

subprocess.run(["git", "clone", repo_url, repo_dir.name], stdout=subprocess.PIPE, stderr=subprocess.PIPE)

Looks like you just need to pass the variable to subprocess.run to fix this issue.

@jordan-wright jordan-wright added the bug Something isn't working label Oct 4, 2019
@jordan-wright
Copy link
Contributor

Hey there! Thanks for sending this in. @nickmooney and I will take a look and see if we can get a fix in place.

nickmooney pushed a commit that referenced this issue Oct 21, 2019
@nickmooney
Copy link
Contributor

Whoops, ignore the above.

Anyway -- thanks for filing the issue, @Sorsnce! The GitHub token is used to configure the GitHub client that's used to hit the APIs to get repos/users/commits. The intention was not to use it to access private repositories, but it seems like it could serve this purpose.

I'll think about this and see if we can include the functionality in the future.

@realytcracker
Copy link

i have submitted a PR that addresses this issue, but it may not be idiomatic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants