"header field value cannnot include CR/LF" with github pages deployment

I’m seeing header field value cannnot include CR/LF (ArgumentError) in my GitHub Pages deploy right after “Install deployment dependencies”, but before “Authenticate deployment”.

Example build - https://travis-ci.org/ManageIQ/manageiq.github.io/builds/589636650#L1810
This is consistently failing though - https://travis-ci.org/ManageIQ/manageiq.github.io/builds (See all of the recent failures)

Note that I am using dpl v2.

I don’t see you ever specifying github_token:.

The error message can be explained by the fact that it goes directly to a request header.

1 Like

Ah! I’ll give that a try. I think I misunderstood the documentation [1]. It says that any setting can be set with environment variables, so I do have GITHUB_TOKEN set [2], and I assumed that would fill in the github_token parameter. But I guess that needs to be GITHUB_GITHUB_TOKEN or PAGES_GITHUB_TOKEN?

[1] https://docs.travis-ci.com/user/deployment-v2/providers/pages/#environment-variables
[2] https://travis-ci.org/ManageIQ/manageiq.github.io/builds/589636650#L168

https://docs.travis-ci.com/user/deployment-v2/providers/pages/ has a minimal configuration example right at the top.
In it, Github token is specified under token:

Thank you! Yeah, I’ll specify it directly. I was just confused because I thought setting GITHUB_TOKEN would automatically set the token: parameter.

@native-api So this is strange… I set the token: explicitly and it worked. But now, a follow up run is failing with the same error, even though token is set this time…

See https://travis-ci.org/ManageIQ/manageiq.github.io/jobs/592208793. The GITHUB_TOKEN env var is set (https://travis-ci.org/ManageIQ/manageiq.github.io/jobs/592208793#L168), and the config shows the token set - https://travis-ci.org/ManageIQ/manageiq.github.io/jobs/592208793/config

One thing I did notice is that both .org and .com seem to run the build, which I’m not sure why. That also seems to create double commits to the target branch. GITHUB_TOKEN is set in both, so I’m not sure it’s directly related to this issue.

Judging by https://github.com/ManageIQ/manageiq.github.io/compare/9bc1a49db69ffc4dfb9352a79d1664345a27de42..170fac78084493a2da71d3fb917150482c90032c and https://travis-ci.org/ManageIQ/manageiq.github.io/builds/591572964#L1816, the source directory for the deployment now doesn’t exist.