I am trying to encrypt some signature details using travis cli:
travis encrypt SONATYPE_USERNAME=xxxx
I get an error saying :
not logged in, please run travis login --pro
Is it required to have a pro login to use encrypt? Can I not use org login and use this command?
To encrypt, Travis-CLI will require being logged in first. The --pro flag provided with the help string is a good default (travis.com (paid) users are more likely to use the CLI), but not strictly necessary and can be replaced with --org, which will use the travis.org (free) endpoint.
for https://travis-ci.org
travis login --org
travis encrypt <string> --org
Related
On my Travis CI enterprise setup, when I use the Travis CLI to encrypt a password, it complains that I'm not logged in, although I logged in successfully just before.
$ travis login -e https://travis-ci.my-company.corp/api
We need your GitHub login to identify you.
This information will not be sent to Travis CI, only to github.my-company.corp.
The password will not be displayed.
Try running with --github-token or --auto if you don't want to enter your password anyway.
Username: itsme
Password for itsme: ********
Successfully logged in as itsme!
$ travis encrypt
not logged in, please run travis login --pro
Setting a default endpoint for the Travis CLI solved this for me:
travis endpoint --set-default --api-endpoint https://travis-ci.my-company.corp/api
travis login
travis encrypt "escaped_password" --add deploy.password
While you're here, as a side note: When using travis encrypt, remember to escape special characters in your password, because they'll be evaluated by bash in the build environment...
I tried using Jenkins or my admin username as user and password. For password, I tried to update using sudo passwd jenkins, so I am fine on that. However, I am skeptical about the user name. How do I confirm the username for Jenkins? Can someone pls help me?
During the initial run of Jenkins a security token is generated and printed in the console log. The username is admin
The token should look something like,
*************************************************************
Jenkins initial setup is required. A security token is required to proceed.
Please use the following security token to proceed to installation:
41d2b60b0e4cb5bf2025d33b21cb
*************************************************************
For me the initial admin password was in a log at ~/.jenkins/secrets/initialAdminPassword
after installing with homebrew.
source
If you pod is running in a Kubernetes cluster, just look at the running process … Your initial password will be shown…
e.g.
--argumentsRealm.passwd.admin=**3kJQtPDkhk** --argumentsRealm.roles.admin=admin
Username: admin
For password,
cat /Users/$(whoami)/.jenkins/secrets/initialAdminPassword
you will get similar to this token 2762710d8dab4c88a59fea0a2e559069
I'm trying to login to an own hosted Travis Enterprise, but usual travis login and travis login --pro are trying to login to usual Travis SAAS environment
Given that your Travis is hosted at travis.fewlaps.com, run
travis login -I -t your-travis-token -e https://travis.fewlaps.com/api --github-token=personal-access-token-from-githubenterprise &&
travis endpoint --set-default -e https://travis.fewlaps.com/api
...and then, to use your own Travis instead of the common one at every travis command,
travis endpoint --set-default -e https://travis.fewlaps.com/api
Remember that Travis will need that your GitHub Enterpise has the needed permissons. Right now, we're giving to that token these permissions:
repo (all of them)
admin:repo_hook
user
For those still struggling with this, the following helped me:
travis login --pro -X --github-token ${github-token}
Make sure you set the github token for your personal account with access to the private repos as detailed here, and create the token with the following permissions:
For private projects:
user:email (read-only)
read:org (read-only)
repo
for open source projects:
user:email (read-only)
read:org (read-only)
repo_deployment
repo:status
write:repo_hook
I have been struggling with this for several months and finally figured it out (accidentally). You can use the -X option to log into enterprise accounts. This might have always been present, but I was not aware of it.
travis login -X --github-token ${my-github-enterprise-token}
Then enter the enterprise domain when prompted and use it as the default endpoint.
I've been looking at https://github.com/rfdickerson/watson-translation-demo which attempts to show how to do authentication using Facebook OAuth on iOS and with a NodeJS Backend.
The iOS code is straightforward :
let token: String = FBSDKAccessToken.currentAccessToken().tokenString
let fbAccess = FacebookAuthenticationStrategy(
tokenURL: "https://watsonsdkdemo.mybluemix.net/language-translation-service/api/v1/token",
fbToken: token)
translateService = LanguageTranslation(authStrategy: fbAccess)
The problem is that the server/app.js has
var creds = appEnv.getServiceCreds(/facebook-authentication/) || {}
and the manifest.yml has
- services:
- facebook-authentication
But when you cf push the scripts to your Bluemix account you get:
FAILED
Could not find service facebook-authentication to bind to xxxxxxx
The problem is nowhere does the author describe what the 'facebook-authentication" service is.
In the server deployment instructions they have
$ cf login
$ cf create-service speech_to_text standard speech-to-text-service
$ cf create-service text_to_speech standard text-to-speech-service
$ cf create-service language_translation standard language-translation-service
$ cf env
$ cd server
$ cf push
Nothing stating what the facebook-authentication service is.
I apologize that the instructions are incomplete. facebook-authentication is supposed to be a user-provided service. You can create it using the cf create-user-provided-service command:
cf create-user-provided-service facebook-authentication -p "APP_SECRET_GOES_HERE"
The idea is that when you register a Facebook application, they give you an App Secret. Since that secret should not be embedded in the source code, you can set it in the environment variables VCAP by creating a custom service that provides that information for you.
Note, I did not finish actually using the app secret to check the legitimacy of the credentials. Although this is a small security vulnerability for man-in-the-middle-attacks, the facebook token checking still works because in the Facebook App settings I made it so that using the App secret is not required. For now, just create the user service and set the value to anything you would like.
Hope this helps!
I'm trying to run a test with sauce labs + travis CI but no luck.
Here's where I think the issue is:
https://travis-ci.org/angulytics/angular-snitch/builds/50894194#L402
UnknownError: Sauce Labs Authentication Error.
You used username 'None' and access key 'None' to authenticate, which are not valid Sauce Labs credentials.
However, I have added the keys to my travis settings page. Also, it looks like Travis is in fact exporting them
https://travis-ci.org/angulytics/angular-snitch/builds/50894194#L80
$ export SAUCE_USERNAME=[secure]
$ export SAUCE_ACCESS_KEY=[secure]
So what's going on?
If it helps, you can check the rest of the protractor.conf here
https://github.com/angulytics/angular-snitch/blob/master/protractor.conf.js
I can't remember where exactly I found the answer, but I had to remove the seleniumAddress config option for reasons I don't really understand.