Azure DevOps manual agent installation on windows, Steps - asp.net

I am facing troubles in installing the agent manually If I follow the installation guide in the TFS portal.
These steps not working for me and gives unexpected errors:
what are the clear steps for that?
Error like:
VS30063:You are not authorized to access http://xxx.xxx.x.xxx:8080. Failed to
connect.
it's not reasonable because I have administrator privilege in server in TFS all but I can't pass it

what about workaround
1- download agent files
2- put them at any location like C:\agents
3- at PowerShell cd C:\agents
4- .\config.cmd --deploymentgroup --deploymentgroupname "deploymentgroupname" --agent $env:COMPUTERNAME --runasservice --work '_work' --url 'http://xxx.xxx.xxx.xxx/tfs/' --collectionname 'DefaultCollection' --projectname 'projectname' --auth Negotiate;
5- enter username and password

Related

RSSH shows Permission denied while trying to connect SFTP after setting uid of sftp user after rssh upgrade

SFTP stopped working once I upgraded RSSH to rssh-2.3.4-16.el7
I did all necessary setup for sftp, and it was working fine with rssh-2.3.3-2.el7.
I have a perl script which get invoked once user try to connect sftp, The script changes user to valid sftp user using setuid and setguid, below is the part of that code:
POSIX::setgid($sftp_gid);
POSIX::setuid($sftp_uid);
Post that script executes rssh:
/usr/bin/rssh -c /usr/libexec/openssh/sftp-server
This was working before I upgrade rssh, and stopped working after upgrade, it started giving error:
Can't exec "/usr/bin/rssh": Permission denied
It might be due to security fix of CVE-2012-3478 but not sure.
It works if I remove setuid and setgid code.
Can anyone help into this?

How to use the password in pubxml.user during dotnet publish

I am trying to setup CI for a ASP.NET project. There is a publish profile defined in VS, which is working fine. (I can deploy the page to a remote IIS server.)
I want to automate this, using GitLab, so I am looking for a command line equivalent of the publish action of VS.
The publish profile files that VS is using can be found under Properties\PublishProfiles. I have 2 files here:
myServer.pubxml (contains the username to use for deploy, and other server data, like hostname)
myServer.pubxml.user (contains the encrypted password for the user)
My attempts to deploy/publish on the command line:
dotnet publish /p:PublishProfile=myServer.pubxml
This results in the following error:
MSDEPLOY : error Code: ERROR_USER_UNAUTHORIZED [C:\Users\myUser\source\repos\Beam Time Request\BeantimeRequest\BeantimeRequest.csproj] Error : The remote server returned an error : (401) Unauthorized. [C:\Users\myUser\source\repos\Beam Time Request\BeantimeRequest\BeantimeRequest.csproj] MSDEPLOY : error count: 1. [C:\Users\myUser\source\repos\Beam Time Request\BeantimeRequest\BeantimeRequest.csproj]
Which is logical, as I have not defined the password.
I can set the password on the command line, like this:
dotnet publish /p:PublishProfile=myServer.pubxml /p:password=myPassword
And this works, but I want to avoid having the password written in plain text.
So how could I tell dotnet publish to use the password from the myServer.pubxml.user file?
If anyone come across this:
I solved this with a GitLab Secret, as follows:
Defined a new GitLab Secret for the repository, called DEPLOY_PASSWD
using the following command to deploy:
dotnet publish -c Release -o Publish /p:PublishProfile=myServer.pubxml /p:password=$DEPLOY_PASSWD"

"Authenticating... Credentials were rejected, please try again" in Git Bash

I already followed URLs like
https://github.com/cloudfoundry/cli/issues/171
Pivotal Cloud Foundry login issue
But things did not solved for me yet.
$ cf login -a https://api.run.pivotal.io --skip-ssl-validation
API endpoint: https://api.run.pivotal.io
Email> pxxx.axxx#gmail.com
Authenticating...
Credentials were rejected, please try again.
Authenticating...
Credentials were rejected, please try again.
Authenticating...
Credentials were rejected, please try again.
API endpoint: https://api.run.pivotal.io (API version: 2.131.0)
Not logged in. Use 'cf login' to log in.
FAILED
Unable to authenticate.
Here is the
$ cf --version
cf.exe version 6.40.0+07673feb9.2018-10-08
If I tried to used windows CMD this works very fine. Being windows user I want to make this working using Git Bash.
it seems to be known issue, as only cmd and powershell are supported on windows.
It can be solved one way using winpty
winpty cf login

How to find the name of the IIS features

I want to script the setup of a machine with powershell and I have no idea how to find the names of the module. I want to build the same script than the script bellow but for asp.net mvc 3, URL Rewrite 2.0, URL authorization...
I tried to search in google, web plateform installer... Am I missing something ?
Ex :
Import-Module ServerManager
$features = #(
"Web-WebServer",
"Web-Static-Content",
"Web-Http-Errors",
"Web-Http-Redirect",
"Web-Stat-Compression",
"Web-Filtering",
"Web-Asp-Net45",
"Web-Net-Ext45",
"Web-ISAPI-Ext",
"Web-ISAPI-Filter",
"Web-Mgmt-Console",
"Web-Mgmt-Tools",
"NET-Framework-45-ASPNET"
)
Add-WindowsFeature $features -Verbose
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
choco install -y webdeploy
Open a PowerShell prompt and use the Get-WindowsFeature cmdlet.
I believe this PS module is installed by default on servers. For client machines, running Windows 7 for example, you can install the Remote Server Management Tools - https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=7887

ORA-12547: TNS Lost Contact when running DBCA on Oracle 11g installation on Ubuntu Linux 12.04 64 bit

I'm trying to create a database using DBCA on Oracle 11g installation on Ubuntu Linux 12.04 64 bit.
I followed the instructions here, but I get
ORA-12547: TNS Lost Contact when running DBCA.
Below are the details. Can someone assist with the solution?
Instead of using /opt/oracle as the "oracle" user home, I used /home/oracle
I did not install the libstdc++5 in 32 bit version
I did everything else the same as the posting
Installation resulted in "missing packages". I tried to do an apt-get install for these packages from ubuntu, but ubuntu says that they don't exist.
Then I saw in the instructions:
Once you will reach the "pre-reqs" screen, check "Ignore all" to continue the installation.
When running ./dbca from $ORACLE_HOME/bin, it fails with ORA-12547.
I checked $ORACLE_HOME/network/admin and listener.ora , sqlnet.ora , and tnsnames.ora all look OK.
However, I think that tnsnames.ora is not being read properly, because ./tnsping fails and the error message states that "EZ Connect" was used.
But in my sqlnet.ora , I have
names.directory_lookup = (TNSNAMES,EZCONNECT)
It should use EZ Connect only after tnsnames is tried.
Also, I sometimes get ORA-12541: No listener. I tried running ./netca. Everything is OK until I perform a test on the listener, and it fails.
I can't run ./lsnrctl. Absolutely nothing happens for this, as well as lsnrctl start, stop, status.
I can't go through sqlplus. If I run ./sqlplus , it asks me for username/password directly.
If I do ./sqlplus / as sysdba, then this results in "ORA-12547: TNS lost contact".
All environment variables are set correctly in .bashrc.
I tried re-running root.sh , but the problem is not fixed.
/etc/oratab is OK
/etc/hosts is OK, but I can't always ping the "localhost" or "127.0.0.1", or "ubuntu" or "127.0.1.1"
The same TNS or Listener errors display.
When I login in oracle (sqlplus system/pass as sysdba), I got this:
ERROR:  
ORA-12547: TNS :lost contact when try to connect to Oracle.
First, I think the server is down, but I check it, it is OK. And so many body say 'chmod 6751 oracle', I did it, but I got another error:
ERROR:
ORA-01031: insufficient privileges
Enter user-name:
finally, I switch the system user from root to oracle. And I login success.
Ensure the DB is up and running and you can connect locally AS SYSDBA to the database
using Oracle binaries owner (usually oracle:oinstall Unix / Linux user). If it does not
work, probably you encounter a different problem.
1. Check privileges of an Oracle file on Unix / Linux host where database is running:
cd $ORACLE_HOME/bin
ls -ltr oracle
2. Change permissions as below:
chmod 6751 oracle
ls -ltr oracle
This code may help you lot.

Resources