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.

digdag push not works by nginx basic auth.

See original GitHub issue

Hi.

digdag push not works digdag server is basic auth by Nginx.

access route is here. client => ELB => Nginx:80 => digdag:65432

occured this error(digdag-v0.9.27).

digdag push ai --project ai -e 'http://user:password@domain.ap-northeast-1.elb.amazonaws.com/' -l debug
2018-08-24 16:54:00 +0900: Digdag v0.9.27
Creating .digdag/tmp/archive-9044667705279783852.tar.gz...
  Archiving ai.dig
  Archiving common/deploy.dig
  Archiving deploy.dig
Workflows:
  ai.dig
  deploy.dig
error: For input string: "password@domain.ap-northeast-1.elb.amazonaws.com/" (number format)
java.lang.NumberFormatException: For input string: "password@domain.ap-northeast-1.elb.amazonaws.com"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.parseInt(Integer.java:615)
	at io.digdag.cli.client.ClientCommand.buildClient(ClientCommand.java:201)
	at io.digdag.cli.client.ClientCommand.buildClient(ClientCommand.java:112)
	at io.digdag.cli.client.ClientCommand.buildClient(ClientCommand.java:94)
	at io.digdag.cli.client.Push.push(Push.java:119)
	at io.digdag.cli.client.Push.mainWithClientException(Push.java:53)
	at io.digdag.cli.client.ClientCommand.main(ClientCommand.java:64)
	at io.digdag.cli.Main.cli(Main.java:187)
	at io.digdag.cli.Main.main(Main.java:82)

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
serihirocommented, Sep 26, 2018

@toyama0919 Digdag implements own url parser and it does not support a URL which includes basic auth id and password.

https://github.com/treasure-data/digdag/blob/cb983f4e724c0db41b7abe1eb89744c5500b46d0/digdag-cli/src/main/java/io/digdag/cli/client/ClientCommand.java#L174-L202

As a workaround, Digdag cli can be taken http header options from option or SystemConfig file.

For example, you can set arbitrary http request headers with -H option.

$ digdag attempts -H Authorization="Basic aWQ6cGFzc3dvcmQ="

Also, you can set Authorization header by adding the following line in your SystemConfig file and specifying it with option -c .

client.http.headers.Authorization="Basic aWQ6cGFzc3dvcmQ="
$ digdag attempts -c cli.properties

Environment variable DIGDAG_CONFIG is also can be used

$ export DIGDAG_CONFIG=client.http.headers.Authorization="Basic aWQ6cGFzc3dvcmQ="
$ digdag attempts

For more detail, please see the reference of CLI

0reactions
yoyamacommented, Dec 16, 2020

@hiroyuki-sato Thank you for your notification. I will close it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - digdag push not works by nginx basic auth. -
Coming soon: A brand new website interface for an even better experience!
Read more >
Command reference — Digdag 0.10.4 documentation
If this option is not set, digdag log command doesn't work. Example: --task-log digdag. ... (string. if not set, auth with local authentication...
Read more >
Restricting Access with HTTP Basic Authentication | NGINX Plus
Introduction. You can restrict access to your website or some parts of it by implementing a username/password authentication. Usernames and passwords are ...
Read more >
(SOLVED) Nginx basic auth not working - Configuration
After you enable it, try opening an incognito browser and connecting. If that works, clear your browser cache. For the app, I'm not...
Read more >
Hiroyuki Sato on Twitter: "@kazz_ogawa readonlyはmogとかで ...
digdag ってまだlogin,logout、readonly等って実装されていないよね・・・? ... Hi. digdag push not works digdag server is basic auth by Nginx. access route is ...
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