Cruisecontrol failing after changing repository - continuous-integration

Initially Cruisecontrol was running perfectly. We had changed from stash to github url. Upon changing we always endup with error 'CheckForModifications'. Not sure whether the credentails/url has been cached.
Error Message:
Source control operation failed: fatal: remote error: CAPTCHA required. Your stash account has been marked as requiring a CAPTCHA to be solved before you may login agin. This is typically caused by too many attempts to login with an incorrect password. The required CAPTCHA prevents your SCM client from accessing Stash until it is solved, even if you enter your password correctly.

It sounds like it is still trying to access Stash. to change the remote url, go to your working directory and use
git remote set-url origin https://github.com/user/repo.git

Related

Getting 403 when trying to push packages to nuget.org

I've been following this document on How to Publish a Package to nuget.org gallery, and I keep getting 403 forbidden.
I've done the following steps:
Browsed to my account in nuget.org.
Clicked on my name -> API Keys
Created an API key as such:
I already have a .nupkg file, so now I try:
$ nuget.exe push .\Test.1.2.3.nupkg -Source https://api.nuget.org/v3/index.json -Apikey <apikey>
And I keep getting:
Pushing Test.1.2.3.nupkg to 'https://www.nuget.org/api/v2/package'...
PUT https://www.nuget.org/api/v2/package/
Forbidden https://www.nuget.org/api/v2/package/ 2238ms
Response status code does not indicate success: 403 (The specified API key is invalid, has expired, or does not have permission to access the specified package.).
Why is that??
The error message said "The specified API key is invalid, has expired, or does not have permission to access the specified package."
You can check this link
If you're using a valid API key that you just created, then this message indicates a naming conflict, which isn't entirely clear from the "permission" part of the error. Change the package identifier, rebuild the project, recreate the .nupkg file, and retry the push command.
Hope it can solve yout problem.

Using token to access GitHub repositories on windows

Trying to figure out how to force command-line git to use Github token. If I clone repository with user name and token like git clone https://<user>:<mytoken>#git.web.com/organization/repositorythen everything works fine.
When I try to clone without the user name or token then the operation fails with an error:
remote: Password authentication is not available for Git Operations.
remote: You must use a personal access token or SSH key.
I would like to store that token somewhere so that I would not have to give it to git every time. Where should I store the token?
I tried to add token variable to a [user] section in .gitconfig file but it did not work.
Tried unsetting and setting (wincred) credential helper but that did not work either.
You should enable a credential manager, such as wincred, and then when Git prompts you for the username and password, enter the username and your token as the password. Git will then tell the credential helper to save the password in the system credential store, and future operations to the same server will reuse those credentials.
This is much more secure than using the token in the URL, because the system credential store is encrypted, whereas the file containing the URL is not.
It may be the case that you already have invalid credentials saved for that remote which are causing the failure; if so, see this answer for instructions on how to remove them so Git prompts you again, and then follow the steps above.

Unable to find the maintenance token for TeamCity in the server log

I installed TeamCity on Windows Server 2012. It has been working fine setting up a few builds. I then attempted to install some plugins by putting .zip files in the ~/.BuildServer/plugins folder. I restarted the server by cd'ing to c:\TeamCity\bin and running "runAll stop" followed by "runAll start".
Then when I go to the teamcity page for several minutes I get a "Enter the maintenance authentication token" page. It says on the page to find the maintenance token in the teamcity-server.log file (see screenshot below). I look in c:\TeamCity\logs\teamcity-server.log and it has several "super user token" and "agent authorizationtoken". I tried using these token but get an invalid maintenance token error.
So my question is where do I find the maintenance token?
Edit: This has resolved itself for me since upgrading to the latest TeamCity version. None of the suggested answers worked at the time I had this problem so that's why I am not marking anything as the accepted answer.
Please check out file teamcity-winservice.log in logs subfolder of your Teamcity.
Auth token should be here.
open cmd goto TeamCity instalation folder
C:\TeamCity\bin
type
runAll.bat stop
wait until services stoped then type
runAll.bat start
u will see current authentication token in console,.
It should be in the file teamcity-server.log which is in the logs subfolder of your TeamCity installation - look for the text "Administrator login is required from web UI using authentication token" and a long number afterwards which is your token.
Also see the docs for TeamCity Maintenance Mode.
Had the same issue it is the Superuser token you want (it will be the last line in the log unless you have tried to login - which will show in here as failures)
Along the lines of
Administrator can login from web UI using authentication token: 1234567890
/Edited so line in log file is more obviously a quote and added an example token thanks #Kleopatra,
Took me a while to find it, but it's in the file as indicated, but it's the very last line.
if you are hitting on this issue https://youtrack.jetbrains.com/issue/TW-43100 in TeamCity (v10.0.4) for IE, you may need to enable javascript and also add the url to IE trusted site list.
If you cannot find in the log, just type a random value. The web ui will inform you that entered an invalid token.
Afterwards go to the log (TeamCity/logs/teamcity-server.log) and check the last line:
[2018-03-27 17:55:20,258] WARN - jetbrains.buildServer.STARTUP - Failed maintenance authentication from IP address /86.234.23.62 with token: "6056431478480274143". Current authentication token: "6418830881320521552"
I tried restarting the Teamcity service.
I tried the runAll stop start thing.
Didn't work for me.
I rebooted then found the superuser token in TeamCity/logs/teamcity-server.log
You will find multiple super user authentication token in the file specified (TeamCity\logs\teamcity-server). You can always use the last one in the file. (if there is not one in the last line, try logon with random number, you can get an authorization failed message with the token number included and it will be added to the file)

while installing yii2/jui package getting error

Using version ~2.0#dev for yiisoft/yii2-jui ./composer.json has been
updated Loading composer repositories with package information
Updating dependencies (including require-dev)
Could not fetch https://api.github.com/repos/jquery/jquery, enter your
GitHub credentials to go over the API rate limit A token will be
created and stored in
"C:/Users/nimmy/AppData/Roaming/Composer/auth.json", your password
will never be stored To revoke access to this token you can visit
https://github.com/settings/applications Username:
I am getting above error while I try to install yii2/jui. I want do use a datepicker. I tried to install datepicker and composer also, but I am getting the same error.
What could I try next?
You should try composer self-update. Then run update again. Keep in mind, that GitHub imposes a limit of 60 requests per hour for unauthorized user's IP!
By entering your credentials, or alternatively it may ask you for your Authorization Token (which you can generate inside GitHub and provide to composer when prompted for it), you should extend your limit to 5000 requests per hour.
If everything is done correctly, but composer keeps saying that the Authentication Token is wrong, try making a new GitHub account and try updating again providing the credentials for the new account. In the past I had a problem when an account had the wrong authorized requests counter stored by GitHub which was counting all requests as unauthorized, making new account worked like a charm, although figuring out the problem and reporting it worked also ;)

github ssh key not saving and asking for password every time

I have a couple repo's on my local machine from github. The last repo I just created asks me for my login/password info every time I try to communicate with the github servers. All of my other repos work just fine and don't ask me every time. I followed the instructions here:https://help.github.com/articles/working-with-ssh-key-passphrases but no luck. I never get the keychain popup asking for my password. What am I doing wrong?
Look inside the .git/config file for that repo and see what the url section looks like. If it starts with https you will get prompted for a password. You need to use the ssh protocol for the url which would look similar to:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git#github.com:ACCOUNT/PROJECT.git

Resources