Skip to content
This repository was archived by the owner on Nov 17, 2021. It is now read-only.
This repository was archived by the owner on Nov 17, 2021. It is now read-only.

cic track start stacktraces .netrc permissions incorredt #113

@jimconner

Description

@jimconner

If you have incorrect permnissions on your .netrc then cic track start will give a confusing error message mentioning /root/.netrc which is not the path on the user's drive - We need to catch this error and give a less confusing message response.

a591380@UKMAC310630 ~/development/cic (master) []$cic track start ansible
/root/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/netrc-0.11.0/lib/netrc.rb:45:in `check_permissions': Permission bits for '/root/.netrc' should be 0600, but are 444 (Netrc::Error)
	from /root/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/netrc-0.11.0/lib/netrc.rb:52:in `read'
	from /root/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/octokit-4.13.0/lib/octokit/authentication.rb:66:in `login_from_netrc'
	from /root/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/octokit-4.13.0/lib/octokit/client.rb:125:in `initialize'
	from /cic/bin/support/ruby/lib/commands/track/helpers.rb:61:in `new'
	from /cic/bin/support/ruby/lib/commands/track/helpers.rb:61:in `github_client'
	from /cic/bin/support/ruby/lib/commands/track/helpers.rb:93:in `setup!'
	from /cic/bin/support/ruby/lib/commands/track/command.rb:41:in `block in start'
	from /cic/bin/support/ruby/lib/commands/track/command.rb:40:in `chdir'
	from /cic/bin/support/ruby/lib/commands/track/command.rb:40:in `start'
	from /root/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
	from /root/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
	from /root/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
	from /root/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:115:in `invoke'
	from /root/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:238:in `block in subcommand'
	from /root/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
	from /root/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
	from /root/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
	from /root/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
	from /cic/bin/support/ruby/bin/cic:4:in `<main>'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions